[ic] IC tag in UserTag

Ed LaFrance edl at newmediaems.com
Sun Oct 5 09:28:50 EDT 2003


At 11:21 AM 10/5/2003 +0200, you wrote:
>On Sat, 4 Oct 2003 13:35:17 -0700
>"Grant" <listbox at email.com> wrote:
>
> >
> > > > I need to include the time tag in a block of XML in a UserTag.
> > > How can I
> > > > write this in Perl inside a UserTag:
> > > >
> > > > <LastModifiedTime>[time gmt="1" adjust="-1"]%Y-%m-%d
> > > > %H:%M:%S[/time]</LastModifiedTime>
> > >
> > > $Tag->time({gmt => 1, adjust => -1, body => '%Y-%m-%d %H:%M:%S'});
> > >
> > > Ciao
> > >     Racke
> >
> > Stephen and Ed -
> >
> > Using either of the methods you guys suggested, I get this:
> >
> > Vend::Tags=HASH(0x95510f0)->time( { gmt => '1', adjust => '-1' } '%Y-%m-%d
> > %H:%M:%S' )
> >
> > Who's got the cure?
>
>I think your problem is that function calls are not interpolated within 
>strings.
>
>Bye
>         Racke

In other words, you first need to assign the result of the evaluation to a 
variable:

my $time = Tag->time( { gmt => '1', adjust => '-1' }, '%Y-%m-%d %H:%M:%S' );
my $xml = <<EOXML;
<LastModifiedTime>$time</LastModifiedTime>
EOXML

...or something similar.

- Ed L.

>

===============================================================
New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          edl at newmediaems.com
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax
=============================================================== 



More information about the interchange-users mailing list