logo       

process calling question: msg#00031

Subject: process calling question
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 => \@list } 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 => \@list } ,
               \$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"


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe