On Wed, Jun 25, 2008 at 4:57 PM, Matt Sergeant wrote: > On Wed, 25 Jun 2008, Martijn wrote: >> Speaking of XSP, would it be worth adding a line >> no warnings 'redefine'; >> to the XSP-blurb that is being evaluated? Otherwise, I get tons of >> 'subroutine ... redefined' warnings when an XSP page is loaded again. > > Yes, probably a good plan. > > Though presumably you mean after it has changed? It should only recompile it > if it has changed since the first loading...
That's what I expected too, but I do get the warnings even if I haven't touched the script, even when using the demo/serve_xsp plugin that comes with AxKit. The script pasted below gives subroutine redefined warnings for each of foo, bar and xml_generator. Looking at the transform() subroutine in AxKit2::Transformer::XSP, I do not see why $processor->input would ever return false, which I think is why the XSP-blurb is always evaluated. Martijn. ---------8<--------------8<--------------- <?xml version="1.0" encoding="UTF-8"?> <xsp:page language="Perl" xmlns:xsp="http://apache.org/xsp/core/v1"> <xsp:structure> <xsp:logic> sub foo {} </xsp:logic> </xsp:structure> <xmlroot> <xsp:logic> sub bar {} </xsp:logic> </xmlroot> </xsp:page> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]