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

Script_OnParse

Expand Messages
  • John Drago
    Hello, I was reading through the source for GlobalASA.pm and saw Script_OnParse in there as an event. After a quick google, I really didn t find much - just a
    Message 1 of 2 , Jun 29 10:05 AM
    • 0 Attachment

      Hello,

       

      I was reading through the source for GlobalASA.pm and saw Script_OnParse in there as an event.

      After a quick google, I really didn’t find much – just a couple mentions on this mailing list.

       

      Script_OnParse doesn’t seem to be passed any arguments.  Would it be possible to have a Script_OnBeforeParse event in the Global.asa?

       

      Reason being, it would be great to be able to apply source filters on the ASP code, or XSLT transformations before it’s converted into perl.

       

      Thanks!

      John Drago

       

       

       

       

       

    • Josh Chamas
      ... Hi John, I m impressed that you found it, and I m surprised that it had to be found, that it was never documented. The whole point of Script_OnParse is to
      Message 2 of 2 , Jun 29 8:43 PM
      • 0 Attachment
        John Drago wrote:
        > Hello,
        >
        >
        >
        > I was reading through the source for GlobalASA.pm and saw Script_OnParse
        > in there as an event.
        >
        > After a quick google, I really didn’t find much – just a couple mentions
        > on this mailing list.
        >
        >
        >
        > Script_OnParse doesn’t seem to be passed any arguments. Would it be
        > possible to have a Script_OnBeforeParse event in the Global.asa?
        >
        >
        >
        > Reason being, it would be great to be able to apply source filters on
        > the ASP code, or XSLT transformations before it’s converted into perl.
        >
        >

        Hi John,

        I'm impressed that you found it, and I'm surprised that it had to be found,
        that it was never documented.

        The whole point of Script_OnParse is to be able to apply a source filter
        on the ASP code. The code is available as a scalar ref as:

        sub Script_OnParse {
        my $code = $Server->{ScriptRef}
        $$code .= " ADDED SOMETHING ";
        }

        The script in $code is then processed as normal, and then turned into
        parsed into perl code for compilation.

        Regards,

        Josh

        ________________________________________________________________________
        Josh Chamas, Founder | NodeWorks - http://www.nodeworks.com
        Chamas Enterprises Inc. | NodeWorks Directory - http://dir.nodeworks.com
        http://www.chamas.com | Apache::ASP - http://www.apache-asp.org


        ---------------------------------------------------------------------
        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.