Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: The "right" way to make your script run with old versions of perl

by MidLifeXis (Monsignor)
on Jun 08, 2016 at 15:38 UTC ( #1165154=note: print w/replies, xml ) Need Help??


in reply to The "right" way to make your script run with old versions of perl

Perhaps something like this?

package My::Interface::VersionBased; sub new { if ($some_condition) { return My::Interface::VersionBased::ForCondition1->new(@_); } elsif ($some_other_condition) { require My::External::Interface; return My::External::Interface->new( @_ ); } else { die "Unable to find a proper interface"; } }

--MidLifeXis

  • Comment on Re: The "right" way to make your script run with old versions of perl
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1165154]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2021-05-07 01:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (83 votes). Check out past polls.

    Notices?