[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Lost in Plack



cf sub builder:
    local $_mount = sub {
        $mount_is_called++;
        $urlmap->map(@_);
        $urlmap;
    };
    local $_add = sub {
        $self->add_middleware(@_);
    };
    local $_add_if = sub {
        $self->add_middleware_if(@_);
    };

On Wed, Oct 5, 2011 at 4:06 PM, Jay Hannah <jay.hannah@iinteractive.com> wrote:
haha... no clue what's going on...

j




https://github.com/miyagawa/Plack/blob/master/lib/Plack/Builder.pm#L63

our $_add = our $_add_if = our $_mount = sub {
   Carp::croak("enable/mount should be called inside builder {} block");
};

sub add      { Carp::carp("add is deprecated. Use 'enable'"); $_add->(@_) }
sub enable         { $_add->(@_) }



_______________________________________________
Omaha-pm mailing list
Omaha-pm@pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm



--
Andrew Sterling Hanenkamp
sterling@hanenkamp.com
785.370.4454