DiamondSea has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to port some scripts from an old server to a new one and it appears that the functionality of the CGI::script_name() function has changed when running it from the command line.
When running it from a browser session, it works correctly, but I have a number of scripts that run from cron as command-line programs that breaks because CGI::script_name() no longer returns a from when run from the command line.
Is this intentional or a bug, and is there a way to restore the old functionality?
Running the below script from the command line:on the old working server I get:#!/usr/bin/perl use CGI; print $CGI::VERSION; print "\n"; print CGI::script_name(); print "\n";
but on the new version I get:3.05 /var/www/vhosts/domainname.com/cgi-bin/testcgi.pl
This is breaking bunches of scripts. Is there a way to enable the old functionality? Thanks!3.59 [blank line]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI::script_name() changed or bug?
by GrandFather (Saint) on Apr 29, 2012 at 04:49 UTC | |
|
Re: CGI::script_name() changed or bug?
by NetWallah (Canon) on Apr 29, 2012 at 15:38 UTC |