[Xml-compile] Deep recursion on subroutine "XML::Compile::Translate::particleElement"

Brian Phillips bpphillips+ml at gmail.com
Tue May 24 13:11:45 GMT 2011


Hello -

Is there any way to silence/disable this warning: Deep recursion on
subroutine "XML::Compile::Translate::particleElement"?  I realize this is
generated by Perl but it seems like if XML::Compile knows it may have deep
recursion, it should disable the warning for me.  Maybe? :-)

When parsing/compiling this .xsd file <https://gist.github.com/988583> (of
which I did not write but must use), a ton of these fly by.  For now, I have
installed a $SIG{__WARN__} handler when I compile the reader/writer to limit
the output of the same warning to only the first instance:

my $SCHEMA =3D XML::Compile::Schema->new($path_to_xsd);
my $READER;
my $WRITER;
{
  my %warnings;
  local $SIG{__WARN__} =3D sub { CORE::warn "$_[0]" unless $warnings{ $_[0]
}++ };
  $READER =3D $SCHEMA->compile( READER =3D> 'product-configuration' );
  $WRITER =3D $SCHEMA->compile( WRITER =3D> 'product-configuration' );
}

Can this be done inside XML::Compile somewhere?  Or perhaps recursion
warnings could be turned off explicitly inside XML-Compile somwhere?  Is
there a better way of handling these warnings?  I tried localizing $^W as
well as doing "no warnings" and neither seemed to affect the scope inside
XML::Compile.

Thanks,
Brian Phillips
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20110524/e3=
e46779/attachment.htm


More information about the Xml-compile mailing list