Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Either you fixed it, or you really do have some browser caching issues.

    I dl'd both links, five times each... using wget and the -S option so I could see the server responses.

    I also diff'd the files to make sure my eyes were not playing tricks on me.

    All files are identical.

    I have found that I can greatly reduce browser caching by adding two meta statements to the head section. (I'm leaving out the angle brackets on the ends)

    meta http-equiv="Pragma" content="no-cache"
    meta http-equiv="Expires" content="-1
    • Both links only show the left column.
    • Very cool. I'll check into this. Thanks.
      --

      If things get any worse, I'll have to ask you to stop helping me.

    • Try these links:

      http://exitwound.org/perl/index.pl?method=ByArtist
      http://exitwound.org/music/index.pl?method=ByArtist

      I'll check the diffs with a wget later today. That's a great idea.

      --

      If things get any worse, I'll have to ask you to stop helping me.

      • >http://exitwound.org/perl/index.pl?method=ByArtist

        This one gave me various responses when it worked. And it gave an error message at times... but returned a status of 200, which is technically OK. But, it did state that there was an internal error.

        >http://exitwound.org/music/index.pl?method=ByArtist

        This one seemed to work consistently.

        This might be a stupid question... but... did you "use strict;" as near the top of the script as you can? Helps me find silly typos all the time...

        Some feel that u
        • I'm using strict and warnings.

          The behavior you've described is exactly what I'm talking about. Sometimes it works, sometimes it doesn't.

          I looked through the script for any values that might be hanging around following exectution. The only thing I found that was created but not populated is:

          my $template; # use for HTML::Template

          I changed that to

          my $template = ' ' ;

          Still, jickiness prevails.

          I really want to stick with HTML::Templates, but everything I've written that doesn't use it works g

          --

          If things get any worse, I'll have to ask you to stop helping me.

          • Apologies if you already know this ...

            If you're using Apache::Registry or similar, then you need to make sure you have no 'file scoped lexicals'. Or in English, use my for variables in subroutines but not for 'globals'. Use 'our' and they really will be globals. eg:

            my $id = $query->param('id');

            print get_item();

            exit;

            sub get_item {
            # select data using $id
            # stick it into the template
            }

            In this (silly) example, the first time the script is run it will work. The second time