Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • I don't know of any problem with using array references in mod_perl. Can you explain what's giving you trouble? Maybe we can help.
    • Any help is luck for me.
      These three script show what happens.
      -------configuration file(

      package PBB::Packages::MyConfigTest;

      use strict;

      @PBB::Packages::MyConfigTest::ISA = qw(Exporter);
      %PBB::Packages::MyConfigTest::stash = (

          "p_type" => "text/html",
          "p_charset" => "UTF-8",
          "p_theme" => "gnome-default",
          "css_files" => ["aa.js", "bb.js"],


      -------startup file(


      use lib qw(/path/myprj)

      use Perl qw(others us);
      • I don't understand. Didn't you want the array to expand? If you were trying to replace it, just set it directly instead of using push:

        $t->{stash}->{css_files} = ['a.js', 'b.js'];

        There are several other things in this code that I would suggest changing, but this forum isn't the best place to do a code review. If you'd like more advice on your code, please post it on the mod_perl mailing list, or on [].