Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Getting Involved with Perl 6 - 2009

by jdrago_999 (Hermit)
on Jun 15, 2009 at 18:09 UTC ( [id://771743]=note: print w/replies, xml ) Need Help??


in reply to Getting Involved with Perl 6 - 2009

What would Catalyst-based code look like if it were all in Perl6?
  • Comment on Re: Getting Involved with Perl 6 - 2009

Replies are listed 'Best First'.
Re^2: Getting Involved with Perl 6 - 2009
by moritz (Cardinal) on Jun 15, 2009 at 20:25 UTC
    "like any other Perl 6 code".

    No really, it's hard to tell, because Catalyst isn't ported to Perl 6 yet. Chances are that the dispatch information which is now implemented as attributes is handled with traits in Perl 6 (I remember a small web framework in Perl 6 floating around on IRC the other day that already did that), so an action method might look like this:

    class YourApp::Controller is Catalyst::Controller { method someaction($id) is public</> { # executed if http://example.com/someaction is called } }

    Maybe the dispatch code will have an option to use the build-in multi method dispatch, which is rather powerful and serves a similar purpose.

    But until somebody actually implements it, that's all just wild guesses.

      Maybe the dispatch code will have an option to use the build-in multi method dispatch, which is rather powerful and serves a similar purpose.

      Interesting idea.

      My guess would've been using a dispatch grammar. Perl6 rules can be composed, ordered, re-used in different contexts, they keep track of your match in a structured way... great for unpacking the url. That doesn't really say much about the syntax though.

Re^2: Getting Involved with Perl 6 - 2009
by John M. Dlugosz (Monsignor) on Jun 16, 2009 at 15:38 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://771743]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found