Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-28 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found