From:
Martijn <sweetwatergeek [at] googlemail.com>
Date:
Wed, 25 Jun 2008 17:46:53 +0100
To:
axkit-users [at] axkit.org
Subject:
ax2: subroutine redefined warnings on XSP pages
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>
Re: subroutine redefined warnings on XSP pages - Martijn on 25 Jun 2008 16:47:56 +0000 Back up to archives |
These pages are copyright © 2002 Apache Software Foundation


Index