eval "use Foo::Bar 5.01 qw| raz baz taz |"; # try loading v5.01 if ($@) { # if loading v5.01 failed warn "$@"; # fallback to using standard (v5.00) use Foo::Bar qw| baz |; # raz and taz arent valid tags here } #### BEGIN { require Foo::Bar; eval { Foo::Bar->VERSION(5.01) }; if ($@) { warn("Warning: Foo::Bar not desired version 5.01. " . "Proceeding anyway\n"); import Foo::Bar qw( baz ); *raz = sub { ... }; *taz = sub { ... }; } else { import Foo::Bar qw( raz baz taz ); } }