[Catalyst] 10 Catalyst Models in 10 Days wrapping up-ish

Ashley apv at sedition.com
Tue Jul 28 15:30:32 GMT 2009

On Jul 27, 2009, at 7:16 AM, Octavian Râsnita wrote:
> From: "Ashley" <apv at sedition.com>> Hey, all.
>> http://sedition.com/a/2733 is mostly done (I have serious repairs  
>> to  do to make #9 work and might drop it entirely for a second  
>> stringer)
> Hi,
> Thank you for it.
> In the first model (Random quotes), I've seen the following line:
> sub get_one : method {
> Can you tell what does ": method" is used for and what happends if  
> we don't use it?
> Is it ok if I will have more questions like this about the next  
> models?

Hi Octavian (and anyone curious). It's attributes, similar to Cat  
dispatch stuff, and it's one of the only ones built-in to Perl. Check  
out http://perldoc.perl.org/perlsub.html and http://perldoc.perl.org/ 
attributes.html for a real description. I'm not sure how useful the  
declaration actually is. It can help disambiguate certain calls when  
names in the global/core collide but I think that's about all it does  

Since we're on the subject, #9 TheSchwartz, is pretty clean now, in  
part thanks to Oleg Kostyuk who just alerted me to a problem. And the  
git depot has downloads with all the stuff working (once you do the  
dependencies): http://github.com/pangyre/p5-myapp-10in10/tree/master

Wrap-up was yesterday: http://sedition.com/a/2744

And since it's been mentioned: my copy of the new book came from  
Amazon (US) on the cheap-o, free shipping in 4 days.


More information about the Catalyst mailing list