OpenPlugin

 view release on metacpan or  search on metacpan

OpenPlugin/Application.pm  view on Meta::CPAN

# soley to get CGI::Application to work properly, as it assumes you are using
# CGI.pm.  If anyone has thoughts on a better way to do this, I would certainly
# be glad to hear them :-)

# When called from CGI::Application, this method act's like the param() in
# CGI.pm.  Otherwise, it just passes the request onto OpenPlugin.
sub param {
    my $self   = shift;
    my @params = @_;

    if( (caller)[0] eq "CGI::Application" ) {
        return $self->SUPER::param->get_incoming( @params );
    }
    else {
        return $self->SUPER::param( @params );
    }
}

# When called from CGI::Application, this method act's like the same one from
# CGI.pm.  Otherwise, it just passes the request onto OpenPlugin.
sub header {
    my $self   = shift;
    my @params = @_;

    if( (caller)[0] eq "CGI::Application" ) {
        return $self->SUPER::httpheader->send_outgoing( @params );
    }
    else {
        return $self->SUPER::httpheader( @params );
    }
}

1;

__END__



( run in 1.924 second using v1.01-cache-2.11-cpan-a3c8064c92c )