On Wednesday 27 December 2006 1:01 pm, Ash Berlin wrote:
> Very very *VERY* bad idea.
>
> __PACKAGE__->mk_accessors(context);
>
> sub ACCEPT_CONTEXT {
>    my ($self, $c, @args) = @_;
>
>    my $new = bless({ %$self }, ref $self);
>    $new->context($c);
>    return $new;
> }

Isn't that really really slow though? Constructing a new object for each call?

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to