in reply to Re: Re: Calling a sub in a Module
in thread Calling a sub in a Module

Two things: if that is exactly what your code says, then you're missing a package declaration. Also you can't use my there. Should be our

package Book::Reader; use strict; use Exporter; our @ISA = qw/ Exporter /; our @EXPORT = qw/ getData /; ....

Incidentally, the Expoter bit doesn't mean anything if you are calling your sub with a fully qualified name like Book::Reader::getData(), so if you don't need to export it, you should get rid of those lines...

Replies are listed 'Best First'.
Re: Re: Re: Re: Calling a sub in a Module
by Tanalis (Curate) on Oct 23, 2002 at 10:08 UTC
    Cool, that's soted it. Cheers for the help. :)