@EXPORT = qw//; @EXPORT_OK = qw/check_digit is_valid valid_chars/;
so if you wanna import is_valid you need to tell explicitly.
see also How to Export
> Is it somehow better to use the second statement if I use only "is_valid" method in my code? Maybe, memory issues or something?
No! No significant memory problems, importing is a kind of aliasing between namespaces.
But you have to care about potential namespace polution, see Selecting What To Export.
Please note that you don't necessarily need to import is_valid, otherwise can also address Algorithm::LUHN::is_valid directly.
Cheers Rolf
In reply to Re: Difference between use Module::Name and use Module::Name qw /method1 method2/
by LanX
in thread Difference between use Module::Name and use Module::Name qw /method1 method2/
by Doctrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |