If you don't want to use namespaces, but to have whichever version you load provide functions in the current namespace, you can use if . . . to get conditional loading of the libraries. Just be sure that $version is set at compile time so use knows about it.
You can play with the logic to get a default version so long as you make sure the decisions are mutually exclusive. Even that isn't carved in stone: you can make warnings.pm ignore sub redefinitions with the lexical no warnings 'redefine';.my $version; BEGIN { $version = shift || whatever(); } use if 1 == $version, 'interface1'; use if 2 == $version, 'interface2';
After Compline,
Zaxo
In reply to Re: Calling same named functions from different modules
by Zaxo
in thread Calling same named functions from different modules
by geckosan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |