cig.log says "Undefined subroutine" - but it's in

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
elaurvick
-


Joined: 14 Oct 2004
Posts: 18
Location: Pacific Beach, CA

PostPosted: Mon Aug 06, 2007 3:49 am    Post subject: cig.log says "Undefined subroutine" - but it's in Reply with quote

Our website is written in php, and I have Abyss set up on my computer so I can test everything before moving it to the live site. No problems, everything works perfectly. Now I want to run our shopping cart (which is written in Perl) on my computer so I can try customizing some parts before I move them to the live site. I copied all the files from the website to my computer and set up Perl. The webpages apparently are finding the main program (store/agora.cgi), but it's not generating the dynamic cart pages. I get an Error 500 and this message in the cgi.log when I try:

Undefined subroutine &main::agora_cookie_save called at agora.cgi line 1600.
CGI: [C:\Perl\bin\perl.exe agora.cgi ] URI: /store/agora.cgi?p_id=01009b Broken pipe

The subroutine IS defined, but it's in a different file:
store/library/agora_html_lib.pl

This is the code:
sub agora_cookie_save
{local($inx);
open(SERVCOOKIE,">$sc_server_cookie_path");
print SERVCOOKIE "# Library of Server Cookies\n";
foreach $inx (sort(keys %agora))
{print SERVCOOKIE "\$agora{'$inx'} = &str_decode('" .
&str_encode($agora{$inx}) . "');\n"; }
print SERVCOOKIE '{local($inx);' .
'foreach $inx (keys %agora)
{' .'$agora_original_values{$inx} = $agora{$inx};}' . "}\n";
print SERVCOOKIE "#\n1;\n";
close(SERVCOOKIE); }

I'm not very familiar with Perl, was hoping to learn as I modify the cart. Can anyone help me with this?
Back to top View user's profile Send private message Send e-mail Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Aug 09, 2007 12:50 am    Post subject: Re: cig.log says "Undefined subroutine" - but it's Reply with quote

elaurvick wrote:
I'm not very familiar with Perl, was hoping to learn as I modify the cart. Can anyone help me with this?


It looks like you've forgot to include that script in the main one using the require instruction http://perldoc.perl.org/functions/require.html .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group