perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luiz Fernando B. Ribeiro" <l...@engenhosolucoes.com.br>
Subject Re: $escmode in libraries
Date Thu, 17 Mar 2005 04:08:23 GMT
On Wed, 16 Mar 2005 17:45:59 -0800, Daniel <embperl@7thfire.com> wrote:

> Did anyone have a suggestion for this?
>
> On Tue, Mar 15, 2005 at 09:14:08AM -0800, Daniel wrote:
>> Hi,
>>
>> I tried using $escmode in a library today, which didn't seem to work.
>>
>>
>> I wrote this for debugging purposes:
>>
>> sub p { use Data::Dumper;
>>     local $escmode=0;
>>     print OUT "\<pre>";
>>     print OUT Dumper $_[0];
>>     print OUT "\</pre>";
>>
>> }

Try this:

sub p {
      use Data::Dumper;
      return "<pre>" . Dumper $_[0] . "</pre>";
}

and in your pages call the sub inside a [+ local $escmode=0; p($data) +]

this syntax works for 1.3.x I don't know what should be changed for  
Embperl 2

-- 
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 6959-7610

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


Mime
View raw message