> 
> Hi, Alan:
> 
> I dont have experience with Catalyst, so maybe I was wrong. But can
> you write the above Mason snippet into:
> 
> %   my $img = $c->stash->{ default_image };
>     <input type="hidden" name="id" value="<% get_img_value($img, 'id')
> %>" >
> 
> then somewhere in your module (make sure it's viewable in Mason comps):
> sub get_img_value
> {
>     my($img, $col) = @_;
>     return defined $img ? $img->$col : '';
> }
> 
> So you won't have extra whitespace problems.. :-)
> 
> Regards,
> Xicheng
> 

Ah, I see.  I guess it's a matter of style.  I'm trying to keep view related
code in the templates rather than have external helper modules.

- Alan


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to