On Fri, 17 Feb 2006, Rodney Rindels wrote:
<%args>
$test=>1
</%args>
<%init>
my $mymodule = MyModule->new(Test=>$test);
</%init>
The value of test is <% $mymodule->{Test} %>
Eek, don't go using your objects like they're hashes! That's a very bad
idea, since one of the main purposes of objects is encapsulation. Instead
do this:
The value of test is <% $mymodule->test() %>
Now you can change the implementation of test() in MyModule.pm without
breaking calling code.
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users