Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Perl module installing at server

by chromatic (Archbishop)
on Aug 19, 2013 at 19:44 UTC ( [id://1050077]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Perl module installing at server
in thread Perl module installing at server

I don't think you took my point at all.

The OP showed code in which the OP already used pragmas and modules in the main program. What possible value is there to the OP in writing yet another program which will somehow have to do or require or use that main program, just to avoid writing a single use lib '...' statement in the main program which the OP has already written and already demonstrated comfort with and competence in using, well, use?

Worse than that convolution, your suggestion is still misleading. What does "call the original main-program" mean? Use system? (Clearly not, because that won't work, because @INC isn't an environment variable inherited between processes.) Use do or require or use? Again, why—and how do you know what "original main-program" to call? Either you hard code its name, in which case your very short program gets a line longer for no benefit, or you make it parametric somehow by playing with $0 and symlinks (clever but not clear at all), taking input from the command line (I'm shaking my head here), or opening a security hole by taking input from untrusted clients in a CGI situation like the OP has demonstrated.

Now you could have talked about sitecustomize.pl, but in a CPanel environment, does that file even exist? Is it accessible to the OP?

Alternately, you could have given the correct and simple and clear answer: use lib '...'; without messing around with invoking other programs at all.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-28 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found