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

2047RE: [soaplite] Re: Diesignal and Expath.pm

Expand Messages
  • Sean.Meisner@VerizonWireless.com
    Nov 12, 2002
      Expat.pm does something squirrely. It has a method that
      allows you to pass in a scalar containing a string of XML,
      OR a handle to a file that presumably contains some XML.

      In order to ascertain whether it's been passed a
      string or a filehandle, the method first attempts to
      treat the variable as a filehandle. This generates a
      die signal if the variable you have passed was a string.
      The method catches the die signal using eval {} so normally
      you would never know the signal was generated.

      This is all good UNLESS the default die handler is overidden.
      Then, you'll see strange behaviour. This has caused problems
      for me when using CGI::Carp in conjunction with Expat,
      because CGI::Carp also overrides the default die handler.

      Cheers,

      Sean


      > -----Original Message-----
      > From: trond_straume [mailto:trond.straume@...]
      > Sent: Tuesday, November 12, 2002 4:08 AM
      > To: soaplite@yahoogroups.com
      > Subject: [soaplite] Re: Diesignal and Expath.pm
      >
      >
      > Hi!
      >
      > Yes, this works just fine!
      >
      > But I still don't get it why "XML/Parser/Expat.pm line 456." sends
      > diesignal when using XML::Parser. May it be due to 5.6.1?
      >
      > Trond
      >
      > --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
      > > Hi Tim,
      > >
      > > > This is an old bug (>6 months). There is a problem with one of the
      > > > pattern
      > > > matches in the pure-perl parser (a bug in the perl detainting). I
      > >
      > > This one?
      > >
      > > (XML::Parser::Lite.pm)
      > > - eval qq{sub parse_re { use re "eval"; 1 while \$_[0] =~
      > > m{$_}go }; 1} or die;
      > > + eval qq{sub parse_re { use re "eval"; my \$t = \$_[0]; 1
      > while
      > > \$t =~ m{$_}go }; 1} or die;
      > >
      > > Trond, does this help? Can't think of anything else.
      > >
      > > Best wishes, Paul.
      > >
      > > --- Tim Jenness <t.jenness@j...> wrote:
      > > >
      > > > This is an old bug (>6 months). There is a problem with one of the
      > > > pattern
      > > > matches in the pure-perl parser (a bug in the perl detainting). I
      > > > think
      > > > Paul has a workaround (it came up in perl5-porters prior to the
      > > > release of
      > > > perl 5.8.0) but I can't remember exactly what that work around is
      > > > (I was
      > > > hoping he would make a new release with this fix in).
      > > >
      > > > Tim
      > > >
      > > > On Mon, 11 Nov 2002, trond_straume wrote:
      > > >
      > > > > But with:
      > > > >
      > > > > $SOAP::Constants::DO_NOT_USE_XML_PARSER=1;
      > > > >
      > > > > I'm not able to run Perl in Tainted mode. The script "stops
      > > > > processing" after recieving the response from the server (just
      > > > > waiting to timeout)...
      > > > >
      > > > > Why?
      > > > >
      > > > > Regards
      > > > > Trond Straume
      > > > >
      > > > > --- In soaplite@y..., "trond_straume" <trond.straume@o...>
      > wrote:
      > > > > > When I included:
      > > > > >
      > > > > > $SOAP::Constants::DO_NOT_USE_XML_PARSER=1;
      > > > > >
      > > > > > to my code, everything seems to work fine (though it runs a
      > bit
      > > >
      > > > > > slower).
      > > > > >
      > > > > > Is it possible that the problem is due to my installation of
      > > > > > XML::Parser?
      > > > > >
      > > > > > (I'm using perl 5.6.1)
      > > > > >
      > > > > > Regards
      > > > > >
      > > > > > Trond Straume
      > > > > >
      > > > > > --- In soaplite@y..., "trond_straume" <trond.straume@o...>
      > > > wrote:
      > > > > > > Hi!
      > > > > > >
      > > > > > > when I'm including this code to mye Soap::Lite client:
      > > > > > >
      > > > > > > sub BEGIN {
      > > > > > > $diehandler = $SIG{'__DIE__'};
      > > > > > > $SIG{'__DIE__'} = \&print_error;
      > > > > > > }
      > > > > > >
      > > > > > > sub END {
      > > > > > > $SIG{'__DIE__'} = $diehandler;
      > > > > > > }
      > > > > > >
      > > > > > > it produces this strange errormessage:
      > > > > > >
      > > > > > > Can't use string ("<?xml version='1.0' encoding='UT") as a
      > > > symbol
      > > > > > ref
      > > > > > > while "strict refs" in use
      > > > > > > at /local/perl/5.6.1/lib/site_perl/5.6.1/sun4-solaris-
      > > > > > > ld/XML/Parser/Expat.pm line 456.
      > > > > > >
      > > > > > > The thing is that the response from the soap-server,
      > includes
      > > >
      > > > > this
      > > > > > > declaration:
      > > > > > >
      > > > > > > <?xml version='1.0' encoding='UTF-8'?>
      > > > > > > blah blah
      > > > > > > blah
      > > > > > > .
      > > > > > > .
      > > > > > >
      > > > > > > Are there any known problems, when using single quotes (')
      > > > > instead
      > > > > > of
      > > > > > > double ("), or is the error due to other problems?
      > > > > > >
      > > > > > > Regards
      > > > > > >
      > > > > > > Trond Straume
      > > > >
      > > > >
      > > > >
      > > > > To unsubscribe from this group, send an email to:
      > > > > soaplite-unsubscribe@y...
      > > > >
      > > > >
      > > > >
      > > > > Your use of Yahoo! Groups is subject to
      > > > http://docs.yahoo.com/info/terms/
      > > > >
      > > > >
      > > > >
      > > >
      > > > --
      > > > Tim Jenness
      > > > JAC software
      > > > http://www.jach.hawaii.edu/~timj
      > > >
      > > >
      > > >
      > > > ------------------------ Yahoo! Groups Sponsor
      > > >
      > > > To unsubscribe from this group, send an email to:
      > > > soaplite-unsubscribe@y...
      > > >
      > > >
      > > >
      > > > Your use of Yahoo! Groups is subject to
      > > > http://docs.yahoo.com/info/terms/
      > > >
      > > >
      > >
      > >
      > > __________________________________________________
      > > Do you Yahoo!?
      > > U2 on LAUNCH - Exclusive greatest hits videos
      > > http://launch.yahoo.com/u2
      >
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
    • Show all 11 messages in this topic