CGI-Application-Plugin-Authorization

 view release on metacpan or  search on metacpan

lib/CGI/Application/Plugin/Authorization.pm  view on Meta::CPAN


sub new {
    my $class  = shift;
    my $name   = shift;
    my $cgiapp = shift;
    my $self   = {};

    bless $self, $class;
    $self->{name}   = $name;
    $self->{cgiapp} = $cgiapp;
    Scalar::Util::weaken( $self->{cgiapp} )
        if ref $self->{cgiapp};    # weaken circular reference

    return $self;
}

=head2 instance

This method works the same way as C<new>, except that it returns the same
Authorization object for the duration of the request.  This method should never
be called directly, since the C<authz> method that is imported into the
L<CGI::Application> module will take care of creating the

lib/CGI/Application/Plugin/Authorization/Driver.pm  view on Meta::CPAN

=cut

sub new {
    my $class = shift;
    my $self = {};
    my $authz = shift;
    my @options = @_;

    bless $self, $class;
    $self->{authz} = $authz;
    Scalar::Util::weaken($self->{authz}); # weaken circular reference
    $self->{options} = \@options;
    $self->initialize;
    return $self;
}

=head2 initialize

This method will be called right after a new Driver object is created.  So any startup customizations
can be dealt with here.



( run in 0.693 second using v1.01-cache-2.11-cpan-65fba6d93b7 )