On Jul 27, 2009, at 7:16 AM, Octavian Râsnita wrote:
From: "Ashley" <a...@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 here.

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.

-Ashley


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to