AidanLee has asked for the wisdom of the Perl Monks concerning the following question:
I have written a few modules that use XML::Parser. I also want them to use utf8; so that my code will be unicode friendly (for at least one of these, it is necessary, as I it stores and retrieves translation tables). But for some reason one of my handlers for the xml parser seems to be giving the utf8 code issues:
Can't locate object method "IsSpace" via package "main" at C:/Perl/lib/utf8_heavy.pl line 30.i traced it back to where it's getting invoked from my code, and it's the last line of my character handler:
I am not sure why this is happening... any ideas?sub _parseChar { my( $parser,$string ) = @_; if( $state_stack[-1] =~ /dataType|label|op|sep/ ) { $value .= $string; } else { csWarn( class=>csErrorClass('CODE_PARAMS'),severity=>csErrorSc +ale('MODERATE'), message => 'illegal syntax in Resource File', debug => "illegal syntax: bare string '$string' out of + context") and return undef unless $string =~ /\s+/; <=== here } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: XML::Parser and the utf8 Pragma
by tye (Sage) on May 11, 2001 at 01:59 UTC | |
by AidanLee (Chaplain) on May 11, 2001 at 05:42 UTC | |
by tye (Sage) on May 11, 2001 at 06:50 UTC | |
|
Re: XML::Parser and the utf8 Pragma
by AidanLee (Chaplain) on May 10, 2001 at 21:09 UTC | |
|
Re: XML::Parser and the utf8 Pragma
by mirod (Canon) on May 10, 2001 at 23:30 UTC | |
by AidanLee (Chaplain) on May 10, 2001 at 23:52 UTC |