IBM Support

Alternatives to using Switch.pm Perl module with CQperl or ratlperl

Question & Answer


Question

What alternatives to using the Switch.pm Perl module are available when using IBM Rational ClearQuest CQperl or ratlperl?

Cause


The Switch.pm module has been dropped from the standard distribution of Perl as of Perl 5.12. 

Refer to the "Deprecations" section in the following article for further information:

http://www.perl.com/pub/2010/04/inside-perl-512.html

Answer


Future releases of ClearQuest will be bundled with newer versions of Perl which will no longer include Switch.pm. Thus, if you are using the Switch.pm module, you should consider using new features that are available in Perl 5.10 and later to replace the functionality of Switch.pm.

Refer to the following FAQ which provides information about the new syntax:

http://perldoc.perl.org/perlfaq7.html#How-do-I-create-a-switch-or-case-statement%3F

[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General Information","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 September 2018

UID

swg21621637