Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: require issue.

by davorg (Chancellor)
on Mar 02, 2007 at 11:51 UTC ( [id://602863]=note: print w/replies, xml ) Need Help??


in reply to require issue.

There are so many ways to do this that it's impossible to give any help without seeing code. Can you produce a cut-down version of the three files (no more than twenty or thirty lines total) that demonstrates the problem.

Replies are listed 'Best First'.
Re^2: require issue.
by siva kumar (Pilgrim) on Mar 02, 2007 at 12:19 UTC
    Hi .. I tried to resolve and have the sample programs.. "Ant" correct me if I am wrong
    main.pl
    require "somefile.pl"; use newform; &someFile(); &newform::func1();
    somefile.pl
    sub someFile { print "LAMP"; } sub someFile1 { print "J2EE"; } 1;
    newform.pm
    package newform; require "somefile.pl"; sub func1 { &someFile1(); print "Inside func1"; } 1;
    while trying to run main.pl, getting the following error
    Undefined subroutine &main::someFile called at s1.pl line 5.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-24 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found