Andy Lester wrote in perl-qa : > I can do this: > > use PHP::Session 0.10; > > to ensure a version number, but I can't do this: > > use_ok( 'PHP::Session', '0.10' );
The optional args to use_ok are for imports, not for version numbers. [...] > Before I go digging into a patch, is this something that we even want to > allow? I know I'd like to allow it, because I'd like to have one .t > file that ensures that I have proper module prereqs for my entire source > tree. You can do : use_ok("PHP::Session"); ok(PHP::Session->VERSION(0.10),'PHP::Session version >= 0.10 loaded'); or much cleaner, wrap the call to VERSION in an eval {} (it'll die if the required version is not present.)