Loading ...
Sorry, an error occurred while loading the content.
 

Re: MP2: trouble in PerlSection: how to do multiple "PerlSetVar"?

Expand Messages
  • Geoffrey Young
    ... it was the full string that you ought to try: push @{$VirtualHost{ * }}, { PerlSetVar = MasonCompRoot /var/www/$dir , ... if all else fails that s always
    Message 1 of 7 , Apr 5, 2004
      >>did you try this:
      >>
      >> push @PerlSetVar, "MasonCompRoot /var/www/$site";
      >>
      >>?
      >>
      >>IIRC most of the configurations could accept a simple string in
      >>mp1, so I would expect things to be pretty much the same in
      >>mp2.
      >
      >
      > but this is for a virtualhost, so it hasta be a sub-item within
      > a <virtualhost> hash, such as
      >
      > ...
      > push @{$VirtualHost{'*'}}, {
      > PerlSetVar => [
      > MasonCompRoot => "/var/www/$dir",
      > MasonDataDir => "/var/cache/mason/$dir",
      > ...
      > ],
      > ServerName => $dir,
      > DocumentRoot => "$main/$dir",
      > ...
      > };
      > ...

      it was the full string that you ought to try:

      push @{$VirtualHost{'*'}}, {
      PerlSetVar => "MasonCompRoot /var/www/$dir",


      > ah. so this looks like a "no can do" type of thing (despite the
      > docs which say it just shifts off the minimum number of args).
      > looks like i'll have to
      >
      > Apache->server->add_config()

      if all else fails that's always available, yes.

      --Geoff

      --
      Report problems: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
      List etiquette: http://perl.apache.org/maillist/email-etiquette.html
    • Will Trillich
      ... ah so. we hadn t tried that -- we had done the string within subarrays like this = so as a workaround, in theory, we could do this: = = PerlSetVar =
      Message 2 of 7 , Apr 5, 2004
        On Mon, Apr 05, 2004 at 08:15:40AM -0400, Geoffrey Young wrote:
        > >>did you try this:
        > >>
        > >> push @PerlSetVar, "MasonCompRoot /var/www/$site";
        > >>
        > >>?
        >
        > it was the full string that you ought to try:
        >
        > push @{$VirtualHost{'*'}}, {
        > PerlSetVar => "MasonCompRoot /var/www/$dir",

        ah so. we hadn't tried that -- we had done the "string within
        subarrays" like this

        = so as a workaround, in theory, we could do this:
        =
        = PerlSetVar => [
        = ["MasonCompRoot /var/www/$site",],
        = ["MasonDataDir /var/cache/mason/$site",],
        = ["MasonAutoHandlerName $autohandlername",],
        = ["MasonDHandlerName $dhandlername",],
        = ["MasonDeclineDirs 0",],
        = ],

        but now, trying it without the subarrays,

        PerlSetVar => [
        "MasonCompRoot /var/www/$site",
        "MasonDataDir /var/cache/mason/$site",
        "MasonAutoHandlerName $autohandlername",
        "MasonDHandlerName $dhandlername",
        "MasonDeclineDirs 0",
        ],

        we STILL get "two args only, please, move along." pooh.
        does it work for you?

        --
        will trillich
        http://www.serensoft.com/
        http://www.midwestRepo.com/
        http://www.skylineAuto.net/


        --
        Report problems: http://perl.apache.org/bugs/
        Mail list info: http://perl.apache.org/maillist/modperl.html
        List etiquette: http://perl.apache.org/maillist/email-etiquette.html
      • HLiu@ap.org
        Try use Data::Dumper; to debug it. Willy ... ah so. we hadn t tried that -- we had done the string within subarrays like this = so as a workaround, in
        Message 3 of 7 , Apr 5, 2004
          Try "use Data::Dumper; " to debug it.

          Willy



          |---------+---------------------------->
          | | Will Trillich |
          | | <will@serensoft.c|
          | | om> |
          | | Sent by: Will |
          | | Trillich |
          | | <will@midwestRepo|
          | | .com> |
          | | |
          | | |
          | | 04/05/2004 11:31 |
          | | AM |
          | | |
          |---------+---------------------------->
          >--------------------------------------------------------------------------------------------------------------|
          | |
          | To: modperl@... |
          | cc: |
          | Subject: Re: MP2: trouble in PerlSection: how to do multiple "PerlSetVar"? |
          >--------------------------------------------------------------------------------------------------------------|




          On Mon, Apr 05, 2004 at 08:15:40AM -0400, Geoffrey Young wrote:
          > >>did you try this:
          > >>
          > >> push @PerlSetVar, "MasonCompRoot /var/www/$site";
          > >>
          > >>?
          >
          > it was the full string that you ought to try:
          >
          > push @{$VirtualHost{'*'}}, {
          > PerlSetVar => "MasonCompRoot /var/www/$dir",

          ah so. we hadn't tried that -- we had done the "string within
          subarrays" like this

          = so as a workaround, in theory, we could do this:
          =
          = PerlSetVar => [
          = ["MasonCompRoot /var/www/$site",],
          = ["MasonDataDir /var/cache/mason/$site",],
          = ["MasonAutoHandlerName $autohandlername",],
          = ["MasonDHandlerName $dhandlername",],
          = ["MasonDeclineDirs 0",],
          = ],

          but now, trying it without the subarrays,

          PerlSetVar => [
          "MasonCompRoot /var/www/$site",
          "MasonDataDir /var/cache/mason/$site",
          "MasonAutoHandlerName $autohandlername",
          "MasonDHandlerName $dhandlername",
          "MasonDeclineDirs 0",
          ],

          we STILL get "two args only, please, move along." pooh.
          does it work for you?

          --
          will trillich
          http://www.serensoft.com/
          http://www.midwestRepo.com/
          http://www.skylineAuto.net/


          --
          Report problems: http://perl.apache.org/bugs/
          Mail list info: http://perl.apache.org/maillist/modperl.html
          List etiquette: http://perl.apache.org/maillist/email-etiquette.html






          --
          Report problems: http://perl.apache.org/bugs/
          Mail list info: http://perl.apache.org/maillist/modperl.html
          List etiquette: http://perl.apache.org/maillist/email-etiquette.html
        • Will Trillich
          ... we do. :( it shows that our structures look the way we expect them to look -- the problem is that they re obviously not the way APACHE expects them to
          Message 4 of 7 , Apr 5, 2004
            On Mon, Apr 05, 2004 at 11:39:16AM -0400, HLiu@... wrote:
            > Try "use Data::Dumper; " to debug it.

            we do. :( it shows that our structures look the way we expect
            them to look -- the problem is that they're obviously not the
            way APACHE expects them to look...

            see new thread Subject: <perl> sections: "*:80 has no VirtualHosts" error




            > |---------+---------------------------->
            > | | Will Trillich |
            > | | <will@serensoft.c|
            > | | om> |
            > | | Sent by: Will |
            > | | Trillich |
            > | | <will@midwestRepo|
            > | | .com> |
            > | | |
            > | | |
            > | | 04/05/2004 11:31 |
            > | | AM |
            > | | |
            > |---------+---------------------------->

            wow. creative bandwidth sink you've got there. (just say no.)

            --
            will trillich
            http://www.serensoft.com/
            http://www.midwestRepo.com/
            http://www.skylineAuto.net/


            --
            Report problems: http://perl.apache.org/bugs/
            Mail list info: http://perl.apache.org/maillist/modperl.html
            List etiquette: http://perl.apache.org/maillist/email-etiquette.html
          Your message has been successfully submitted and would be delivered to recipients shortly.