perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angus Lees <...@inodes.org>
Subject Re: $escmode in libraries
Date Mon, 21 Mar 2005 22:20:04 GMT
At Fri, 18 Mar 2005 09:23:47 -0800, Daniel  wrote:
> On Fri, Mar 18, 2005 at 09:00:16AM +1100, Angus Lees wrote:
> > [$ sub dump $]
> > [# may want to shift first arg here if invoking as $epreq->dump(...) #]
> > [- require Data::Dumper -]
> > <pre>[+ Data::Dumper::Dumper(@_) +]</pre>
> > [$ endsub $]
> > 
> > and I just call that from my embperl pages.  Debugging from within
> > perl libraries I tend to do offline, or just by dumping to stderr
> > (using warn()) - which turns up in the apache logs.
> 
> And you're calling this with an Execute?

Since I almost always use Embperl::Object, I usually put it in my
base.epl and invoke it (from other pages) as $epreq->dump($foo).

If you wanted to invoke it from normal perl code somewhere, you might
be able to do Embperl::Execute('pagewiththatcode.epl#dump', $foo), but
I've never actually tried that.  As I said, from normal perl I
usually just dump to stderr and go through the apache logs afterwards.

-- 
 - Gus


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message