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

getting cookies from a library

Expand Messages
  • Orlando Andico
    hello all, i want to library fy some routines into a .pm (instead of putting it in global.asa) now i need to grab some cookie
    Message 1 of 2 , Jan 10, 2006
    • 0 Attachment
      hello all,

      i want to "library'fy" some routines into a .pm
      (instead of putting it in global.asa)

      now i need to grab some cookie
      $Request->Cookies("some-large-cookie-name");

      i actually want to hide this cookie invocation in the library .pm so that the actual program source doesn't have it (an aesthetic thing). so instead of every page having that cookie line, there's just a simple function call.

      problem: $Request object doesn't exist in the .pm
      i also tried
      $cooky = $Apache::ASP::Request->Cookies("some-large-cookie-name");

      which compiles correctly but doesn't work.

      or is the only solution to hide the function inside global.asa?
    • Harco de Hilster
      ... You will have to use $main::Request to access the Request object outside an ASP script. Good luck, Harco -- ... Harco de Hilster AT Consultancy
      Message 2 of 2 , Jan 10, 2006
      • 0 Attachment
        Orlando Andico wrote:

        > hello all,
        >
        > i want to "library'fy" some routines into a .pm
        > (instead of putting it in global.asa)
        >
        > now i need to grab some cookie
        > $Request->Cookies("some-large-cookie-name");
        >
        > i actually want to hide this cookie invocation in the library .pm so
        > that the actual program source doesn't have it (an aesthetic thing).
        > so instead of every page having that cookie line, there's just a
        > simple function call.
        >
        > problem: $Request object doesn't exist in the .pm
        > i also tried
        > $cooky = $Apache::ASP::Request->Cookies("some-large-cookie-name");
        >
        > which compiles correctly but doesn't work.
        >
        > or is the only solution to hide the function inside global.asa?

        You will have to use $main::Request to access the Request object outside
        an ASP script.

        Good luck,

        Harco

        --
        -----------------+--------------------+-------------------------------
        Harco de Hilster AT Consultancy Phone: +31(0)24-3527282
        Unix Consultant Toernooiveld 104 Fax: +31(0)24-3527292
        6525 EC Nijmegen E-mail: harcoh@...
        The Netherlands
        -----------------+--------------------+-------------------------------


        ---------------------------------------------------------------------
        To unsubscribe, e-mail: asp-unsubscribe@...
        For additional commands, e-mail: asp-help@...
      Your message has been successfully submitted and would be delivered to recipients shortly.