[Catalyst] AtomPP implementation question
Sebastian Riedel
sri at oook.de
Tue Sep 13 11:11:52 CEST 2005
Am 13.09.2005 um 05:18 schrieb D.Murase:
>
> Hi all.
>
> I'm writing AtomPP implementation with Catalyst,
> and wrote this Plugin (attached).
>
> Usage is:
>
> # call $c->atom in your action
> sub entry : Local {
> my ( $self, $c ) = @_;
> $c->atom;
> }
>
> # and then, dispatch to
> # (create|retrieve|update|delete)_entry methods
>
> sub create_entry : Atom {
> my ( $self, $c ) = @_;
>
> my $new_entry = $c->req->entry; # XML::Atom object
>
> ...
> }
>
> ---------
>
> But I think this implementation may be not elegant :(
I for one like it, good work!
Maybe you could make the entry just the first argument and leave
Catalyst::Request untouched.
sub create_entry : Atom {
my ( $self, $c, $entry ) = @_;
}
We also had a long discussion about attributes once when i wrote the
xmlrpc plugin, we thought that "Remote" was a better name for through
subdispatchers exposed methods.
sub create_entry : Remote {
my ( $self, $c, $entry ) = @_;
}
--
sebastian
More information about the Catalyst
mailing list