in reply to Re: Re: Trouble Exporting a Function
in thread Trouble Exporting a Function

I'm sorry, but that's not related to the error he gets (and neither is his snippet).
His error is
Undefined subroutine &main::testMod called at C:\path\path\modtest.pl +line
His problem is that testMod() is not being imported into main. Calling import() explicitly does this when CART::Validate is in the same file. Now if that is module code is separated into a file of it's own then it'll work as expected when useed() as the import call did the job the first time thanks to Exporter code.

Or have I totally misread the question, the error and the code presented?
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: Re: Re: Trouble Exporting a Function
by PodMaster (Abbot) on Mar 13, 2003 at 16:11 UTC
    The snippet he shows does not compile, and as such will not give that Undefined subroutine error, cause it will die at the use CART::Validate; line (Can't locate CART/Validate.pm in @INC).


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.