Re: printing/echo'ing vars/arrays within mason tags?

Guido Brugnara <[email protected]> Tue, 16 Aug 2016 17:49:02 +0200 (CEST)
Newsgroups gmane.comp.web.mason.user
Message-ID <[email protected]>
--===============5183627459994330457==
Content-Type: multipart/alternative; 
	boundary="----=_Part_991_399389916.1471362542640"

------=_Part_991_399389916.1471362542640
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

----- Il 16-ago-16, alle 17:30, Hiram Gibbard <[email protected]> ha scritto: 

> Hi All,
> I'm wondering if there is a way to echo or print our vars or arrays within the
> Mason tags?

You can write to standard error, like: 

% use Data::Dumper; 
% print STDERR Dumper \%my_hash; 

then you can read the result in the log files (I suppos you work on Apache, but I think with other servers the beavior is the same). 

bye 
gdo 

------=_Part_991_399389916.1471362542640
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 10pt; color: #000000"><div><br></div><div><span id=3D"zwchr" data-mark=
er=3D"__DIVIDER__">----- Il 16-ago-16, alle 17:30, Hiram Gibbard &lt;hgibba=
[email protected]&gt; ha scritto:<br></span></div><div data-marker=3D"__QUOTED_T=
EXT__"><blockquote style=3D"border-left: 2px solid #1010FF; margin-left: 5p=
x; padding-left: 5px; color: #000; font-weight: normal; font-style: normal;=
 text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size:=
 12pt;" data-mce-style=3D"border-left: 2px solid #1010FF; margin-left: 5px;=
 padding-left: 5px; color: #000; font-weight: normal; font-style: normal; t=
ext-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 1=
2pt;"><div dir=3D"ltr">Hi All,<br><div>I'm wondering if there is a way to e=
cho or print our vars or arrays within the Mason tags?</div></div></blockqu=
ote>You can write to standard error, like:<br></div><div data-marker=3D"__Q=
UOTED_TEXT__"><br data-mce-bogus=3D"1"></div><div data-marker=3D"__QUOTED_T=
EXT__">% use Data::Dumper;<br data-mce-bogus=3D"1"></div><div data-marker=
=3D"__QUOTED_TEXT__">% print STDERR Dumper \%my_hash;<br><br data-mce-bogus=
=3D"1"></div><div data-marker=3D"__QUOTED_TEXT__">then you can read the res=
ult in the log files (I suppos you work on Apache, but I think with other s=
ervers the beavior is the same).<br data-mce-bogus=3D"1"></div><div data-ma=
rker=3D"__QUOTED_TEXT__"><br data-mce-bogus=3D"1"></div><div data-marker=3D=
"__QUOTED_TEXT__">bye<br data-mce-bogus=3D"1"></div><div data-marker=3D"__Q=
UOTED_TEXT__">gdo<br data-mce-bogus=3D"1"></div><div data-marker=3D"__QUOTE=
D_TEXT__"><br data-mce-bogus=3D"1"></div></div></body></html>
------=_Part_991_399389916.1471362542640--


--===============5183627459994330457==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------

--===============5183627459994330457==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

--===============5183627459994330457==--