Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: mod_perl bareword error

by ysth (Canon)
on Aug 02, 2010 at 04:54 UTC ( #852404=note: print w/ replies, xml ) Need Help??


in reply to Re^2: mod_perl bareword error
in thread mod_perl bareword error

Sorry, wasn't reading the error closely enough. But could you show the beginning part of your cgi anyway?

--
A math joke: r = | |csc(θ)|+|sec(θ)|-||csc(θ)|-|sec(θ)|| |
Online Fortune Cookie Search
Office Space merchandise


Comment on Re^3: mod_perl bareword error
Re^4: mod_perl bareword error
by sflitman (Hermit) on Aug 02, 2010 at 07:19 UTC
    Absolutely, here you go, with minor redaction due to some restrictions from my client:
    use strict; use vars qw/..../; use Archive::Zip qw/:ERROR_CODES/; use CGI; use Data::Alias; use Date::Calc qw/Day_of_Week Decode_Date_US Decode_Month/; use Date::Extract; use Digest::SHA qw/sha1_base64/; use File::Copy; use GDBM_File; use HTML::Defang; use HTML::Entities; use Image::Size; use LWP::MediaTypes qw(guess_media_type read_media_types); use MIME::Entity; use MIME::Base64; use Text::Metaphone; use Time::HiRes qw/time/; BEGIN { $|=1; .... %dispatch=( 'edit' => \&do_edit, 'save' => \&do_save, 'undo' => \&do_undo, 'prior' => \&do_prior, 'next' => \&do_next, 'read' => \&do_read, .... }; } $query=new CGI; %cookie=$query->cookie('app'); %P=(); for $key ($query->param) { $value=encode_entities($query->param($key),'\x80-\xFF'); $P{$key}=$value; } ....
    HTH,
    SSF
      What perl version is this?

      Shot in the dark: replace the use vars with our() declarations.

      Also, I know this isn't your script, but use warnings is even more important than use strict.

      --
      A math joke: r = | |csc(θ)|+|sec(θ)|-||csc(θ)|-|sec(θ)|| |
      Online Fortune Cookie Search
      Office Space merchandise
        5.8.8

        I'll give your idea a shot, thanks!

        SSF

      Shot in the dark, remove the most magical module you are using. In this case, comment out "use Data::Alias;" and any uses of it and see if the problem goes away or changes.

      %cookie=$query->cookie('app');

      The original error looked to me like a problem with out-of-sync quotes. And the only mention of "app" in your code is right after a quote character. You might try shifting some quotes around.

      - tye        

        Appreciated! Data::Alias is pretty magical, but my purpose with it was kind of lame. Without it, haven't seen the error. You are a brilliant person with much scintillations about you, thanks.
        May I ask what motivated your insight? Other than vasty experience, of course.

        SSF

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-09-20 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (153 votes), past polls