in reply to Re: perl module creation problem
in thread perl module creation problem

It seems that @EXPORT = qw( foo ) works in addition to @EXPORT = qw( &foo ) for a function foo in the module. I didn't realize the "&" was required. Why does it still work without the "&"?

Replies are listed 'Best First'.
Re^3: perl module creation problem
by Jenda (Abbot) on Nov 13, 2009 at 15:27 UTC

    Because most often you want to export subroutines and because most of the time whe you call subroutines you do not use the & either. So it's reasonable to write the module so that it exports the subroutine if you do not specify any sigil.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      Heh. So, it works because that's the way it ought to work :). Ok by me.