HTML-MasonX-ApacheLikePlackHandler

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        use strict;
        use warnings;

        sub new {
            my ($class, $table) = @_;

            # XXX: This is very naive, in reality an APR::Table maybe
            # can't be represented as a hash (multiple values for the same
            # key?). Or at least we need magic to implement a similar
            # Tie-interface.
            bless $table => $class;
        }

        sub get {
            my ($self, $key) = @_;

            die "PANIC: Someone's trying to get a key ($key) that we don't have" unless exists $self->{$key};

            if (ref $self->{$key} eq 'ARRAY') {
                # Our dumb emulation for PerlAddVar without supporting all
                # of APR::Table.

lib/HTML/MasonX/ApacheLikePlackHandler.pm  view on Meta::CPAN

    use strict;
    use warnings;

    sub new {
        my ($class, $table) = @_;

        # XXX: This is very naive, in reality an APR::Table maybe
        # can't be represented as a hash (multiple values for the same
        # key?). Or at least we need magic to implement a similar
        # Tie-interface.
        bless $table => $class;
    }

    sub get {
        my ($self, $key) = @_;

        die "PANIC: Someone's trying to get a key ($key) that we don't have" unless exists $self->{$key};

        if (ref $self->{$key} eq 'ARRAY') {
            # Our dumb emulation for PerlAddVar without supporting all
            # of APR::Table.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.631 second using v1.00-cache-2.02-grep-82fe00e-cpan-3b7f77b76a6c )