I'm going to places I've never been before with a map I made up from 
threads on this list and have gotten lost.  (Go figure eh?)

Here are some snippets of code since the whole script is 350+ lines that 
are not relavent.  did I get the { \%User, list => [EMAIL PROTECTED] } right?


### code snippet

my $msgbody;
my @list;

# bunch of processing to get $from, Subject, $date, $msglen

push @list, { from => $from, subject => $subject,
               date => $date, msglen => $msglen
             };

my $spamltr =
    Template->new( { INCLUDE_PATH => [ '/templates' ] } );

$ltr->process( 'report.tt',
               { \%User, mlist => [EMAIL PROTECTED] } ,
               \$msgbody );

# %User holds some 'golbal' data.
# blows chunks

### template snippet

[% username %]

...

[% FOREACH m IN mlist %]
[% m.from %] [% m.subject %] [% m.date %] [% m.msglen %]
[% END %]

###

Then $msgbody is used in an email created and sent using MIME::Entity and 
SMTP_auth.

I'm pretty sure it isn't a variable scoping issue because I used the same 
basic code without TT.  The call to TT process I made up based on several 
messages and thread here.

A thought just occured.  The previous method used escapeHTML (from the 
CGI::Simple::Util module) since there is a lot of special/funny characters 
in the emails' subject line (SPAM).  The error message(s) are like this.

IO::ScalarArray::_eos('IO::ScalarArray=GLOB(0x94299cc)') called at 
/usr/lib/perl5/site_perl/5.8.0/IO/ScalarArray.pm


Thanks,
Rod
-- 
    "Open Source Software - You usually get more than you pay for..."
     "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"



_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to