Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Calling a subroutine located in a module

by Rich36 (Chaplain)
on Nov 02, 2001 at 04:18 UTC ( [id://122726]=note: print w/replies, xml ) Need Help??


in reply to Calling a subroutine located in a module

If you're not working with a subroutine within the package that you are in (in this case "main"), you have to define which package the subroutine is in (i.e. the module).
Try...
my $notesreturn = &ModuleName::OpenNotes($var1, $var2);"

... where "ModuleName" is the name of the module that you've created. Also, make sure that your module is loaded up correctly in @INC.


Rich36
There's more than one way to screw it up...

Replies are listed 'Best First'.
Re: Re: Calling a subroutine located in a module
by Anonymous Monk on Nov 02, 2001 at 06:41 UTC
    Tried this and it didn't help. The test script is in the same directory as the module and it caught some errors in the module when it first loaded. So I think that the module is loading fine.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://122726]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found