[Catalyst] Re: Mason view hackers (and other views), PING

Matt S Trout dbix-class at trout.me.uk
Sat May 19 20:03:24 GMT 2007


On Sat, May 19, 2007 at 07:55:15PM +0200, A. Pagaltzis wrote:
> * Matt S Trout <dbix-class at trout.me.uk> [2007-05-19 19:45]:
> > comp_root => do { my $root = $c->config->{root}; "${root}"; },
> > 
> > would be better, I think.
> 
> Why `do`? Wouldn’t this be just as good?
> 
>     comp_root => "" . $c->config->{root},

Yes, but IMO less explicit.

> The `stringify` method doesn’t have side effects, I hope?

Nah.

> (Also, talk about leaky abstractions…)

Some things don't stringify things they can't handle, sadly. It's entirely
possible this could be fixed at the Mason level.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list