[ic] XML::Simpler

Grant listbox at email.com
Thu Sep 18 18:35:37 EDT 2003


I'm working on an XML parsing UserTag (small donation) that uses
XML::Simpler to go about its XML parsing.  I've been learning a lot about
Perl lately, but this one has me stumped.  The tag is really short so I'll
include the whole thing.  IC won't restart without an error with this
UserTag in the UserTag folder:

###
Usertag xml_simpler Order filename
Usertag xml_simpler Routine <<EOR
use XML::Simpler;
sub {
	my ($filename) = @_;
	my $ref = XMLin($filename);
	return $ref;
}
EOR
###

Here's the error:

###
Calling UI...UserTag 'xml_simpler' code is not a subroutine reference
In line 9 of the configuration file
'/trippystore/ic493/code/UserTag/xml_simpler.tag':
###

But if the "use XML::Simpler" line is removed, IC restarts without an error.
How can that be?  The syntax in the tag is exactly the same as that shown in
the docs here:

http://homepages.paradise.net.nz/gmclean1/cpan/xmlsimpler/XML-Simpler.html

- Grant



More information about the interchange-users mailing list