in reply to Re: Happy unbirthday redux! and other birthday stuff
in thread Happy unbirthday redux! and other birthday stuff

Nice effort.

I would highly recommend using @EXPORT_OK as opposed to @EXPORT. The latter forces the sub names into the caller's namespace. Even though you only have a single sub in most cases, it's still nicer to not pollute a namespace automatically:

our @EXPORT_OK = qw( sub_one sub_two sub_three ); our %EXPORT_TAGS; $EXPORT_TAGS{all} = [@EXPORT_OK];

Now, you can do:

use My::Module qw(sub_one sub_three);

...or even:

use My::Module qw(:all);

...which will import all @EXPORT_OK listed subs.