in reply to Undefined subroutine

A few things wrong: you don't want these to be lexical (my) variables!

my @ISA    = qw(Exporter);
my @EXPORT = qw(Prt Time);

They are not available to Exporter as lexicals, they need to be global symbol-table vars (thus the use vars).

Heh, but the real reason Test::Prt still won't work is because Test is a very, very bad name for your first module. There is already a Test module in your Perl distribution, and your script is most likely loading that instead. A use lib '.' line in the script will tell Perl to look in the current directory to load modules first. Either do that, or change the name of your module's namespace.

blokhead

Replies are listed 'Best First'.
Re: Re: Undefined subroutine
by J9 (Beadle) on Mar 11, 2003 at 14:33 UTC
    Hehe.. <REDFACE MODE ON>

    I have fixed the lexical variable this, that is after all why I used the use vars declaration.

    I have also renamed my module to J9Test.pm now I KNOW there isn't another module there with that name..(I checked)

    <REDFACE MODE OFF>