Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

interactive lose...

by PimpSmurf (Initiate)
on Jun 15, 2000 at 07:55 UTC ( #18239=perlquestion: print w/replies, xml ) Need Help??

PimpSmurf has asked for the wisdom of the Perl Monks concerning the following question:

I have a script called 1.pl
--begin--
require './2.pl';
function();
--end--
it calls function() in 2.pl
--begin--
use CGI ':standard';
sub function {
param();
...
}
--end--
When this is run on perl5.0005 it will allow offline mode. However, on perl5.6.0 it will not. I am not quite sure why this is. offline mode will not work unless the "use CGI ':standard'; param();" is in the file executed, and "use CGI..." is not in the require'd file. I even tried changing 1.pl to this:
--cut--
require './2.pl';
param();
function();
--cut--
It still wont work.
Anything I should know about?
btw... function and file names were changed to protect the innocent.

Replies are listed 'Best First'.
Re: interactive lose...
by Crulx (Monk) on Jun 15, 2000 at 08:08 UTC
    Hey PimpSmurf, That nick is wrong on so manny levels,I like it.
    1. What is the exact error message you are getting?
    2. Does 2.pl end in a 1; so that eval's to true? It needs to if you plan on using it.
    I have tried it on my perl 5.6 and it works fine, offline mode loads and everything. I can only assume that you don't have the 1; at the end of 2.pl.

    Hope this helps!
    ---
    Crulx
    crulx@iaxs.net

Re: interactive lose...
by Anonymous Monk on Jun 15, 2000 at 22:09 UTC
    actually... I appreciate the help... but I figured it out.
    the problem was with CGI::Cookie.
    when you use CGI's :standard functions and CGI::Cookie offline mode disables if $ENV{"HTTPS"} eq 'on'. Which I dont think it should do, (and is undoced I believe.) I have to "export HTTPS=on" to make the script run from console as the script itself requires a ssl connection.
    Thanks for the help.
    PimpSmurf
    PimpSmurf@NO.SPAM.beachaccess.net

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2022-12-03 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?