[Catalyst] Catalyst 5 preview!

Jose Nyimi josenyimi at skynet.be
Thu Mar 31 22:06:49 CEST 2005



> -----Message d'origine-----
> De : catalyst-bounces at lists.rawmode.org [mailto:catalyst-
> bounces at lists.rawmode.org] De la part de Sebastian Riedel
> Envoyé : jeudi 31 mars 2005 18:59
> À : <catalyst at lists.rawmode.org> <catalyst at lists.rawmode.org>
> Objet : Re: [Catalyst] Catalyst 5 preview!
> 
> 
> Am 31.03.2005 um 18:24 schrieb Alan Humphrey:
> 
> > Looks good to me.  I like how it makes things clearer.
> >
> > Two questions:
> >
> > 1) what is the difference between Global and Local?  When would I
use
> > one vs. the other vs. Path?
> 
> Marcus already updated the Manual but i'll explain it here too...
> 
>      package MyApp::C::Foo;
> 
>      # http://localhost:3000/bar
>      sub bar : Global {}
> 
> The Global flag makes Cat use the method name in the global namespace
> (/).
> 
>      package MyApp::C::Foo;
> 
>      # http://localhost:3000/foo/bar
>      sub bar : Local {}
> 
> The Local flag makes Cat use the method name in the local namespace
> (/foo).
> 

So is the following valid with Cat ?

package MyApp::C::Foo;

# http://localhost:3000/bar
sub bar : Global {}

# http://localhost:3000/foo/bar
sub bar : Local {}

The first bar being executed in (/) namespace and
The second in (/foo) namespace.

If yes then I will get confused since from your OP,
You wrote:
"internally all actions get a unique private address".

/foo/bar will no longer be unique here :)

Could you elaborate please ?

Thanks,
José.


José.





More information about the Catalyst mailing list