| CGI-Lazy documentation | Contained in the CGI-Lazy distribution. |
#===========================================================================
Copyright (C) 2008 by Nik Ogura. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bug reports and comments to nik.ogura@gmail.com.
#===========================================================================
CGI::Lazy::Plugin
use CGI::Lazy;
my $q = CGI::Lazy->new('/path/to/config/file');
Internal module used for tracking which pieces of CGI::Lazy are being used. Plugins are enabled or excluded in the config file.
Returns CGI::Lazy::Config object.
Returns CGI::Lazy object
Constructor
CGI::Lazy Object
| CGI-Lazy documentation | Contained in the CGI-Lazy distribution. |
package CGI::Lazy::Plugin; use strict; use CGI::Lazy::Globals; #------------------------------------------------------------------------------- sub AUTOLOAD { my $self = shift; my $name = our $AUTOLOAD; return if $name =~ /::DESTROY$/; my @list = split "::", $name; my $value = pop @list; if (@_) { return $self->{_plugins}->{$value} = shift; } else { return $self->{_plugins}->{$value}; } } #------------------------------------------------------------ sub config { my $self = shift; return $self->q->config; } #------------------------------------------------------------ sub q { my $self = shift; return $self->{_q}; } #------------------------------------------------------------ sub new { my $class = shift; my $q = shift; my $self = bless {_q => $q}, $class; $self->{_plugins} = $self->config->plugins; return $self; } 1 __END__