Re: [Templates] Update to Template/Plugin/XML/Simple.pm

[prev] [thread] [next] [Date index for 2004/09/22]

From: Simon Wilcox
Subject: Re: [Templates] Update to Template/Plugin/XML/Simple.pm
Date: 12:59 on 22 Sep 2004
Whilst patching XML::Simple, please could you include the trick to obey
the IncludePath directive, namely:

> NEW 'new'
> sub new {
>      my $class   = shift;
>      my $context = shift;
>      my $input   = shift;
>      my $args    = ref $_[-1] eq 'HASH' ? pop(@_) : { };
>
>      if (defined($input)) {  # Don't want to break anything...
+          $input = $context->insert($input) unless ( $input =~ /</ );
>          return XMLin($input, %$args);
>      } else {
>          return new XML::Simple;
>      }
> }

Many thanks,

Simon.

        -- 
        "They hung in the air exactly the same way bricks don't."


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Update to Template/Plugin/XML/Simple.pm
Simon Wilcox 12:59 on 22 Sep 2004

Re: [Templates] Update to Template/Plugin/XML/Simple.pm
Darren Chamberlain 13:03 on 22 Sep 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52