Greetings monks,
I'm trying to use List::BinarySearch inside a SKIP: block of Test::More to implement conditional tests without success because I'm not being able to import the function binsearch with require.
This is what I'm trying to do:
SKIP: { eval { require List::BinarySearch; List::BinarySearch->import('bin +search') }; skip "List::BinarySearch not installed", 2 if $@; # a bunch of tests }
Looking at the source of List::BinarySearch I found that it does inherits from Export and it is overriding the import (kind of weird because it is using goto instead calling SUPER) but somehow the method call is not working as expected because I'm getting those errors when executing:
Use of uninitialized value $a in string eq at t/010-sysinfo.t line 62. Use of uninitialized value $b in string eq at t/010-sysinfo.t line 62. Can't call method "binsearch" without a package or object reference at + t/010-sysinfo.t line 62.
I also tried using "List::BinarySearch::binsearch" but it just produce more errors:
Use of uninitialized value $a in string eq at t/010-sysinfo.t line 60. Use of uninitialized value $b in string eq at t/010-sysinfo.t line 60. Can't call method "List::BinarySearch::binsearch" without a package or + object reference at t/010-sysinfo.t line 60.
Am I missing something here, or should I contact the module author? :-)
Thanks,
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |