CGI-MakeItStatic
view release on metacpan or search on metacpan
lib/CGI/MakeItStatic.pm view on Meta::CPAN
use Carp ();
use overload '""' => sub { my($self) = @_; return $self->has_static ? 0 : $self };
our $VERSION = '0.03';
$| = 1;
sub check{
my($class, $q, $attr) = @_;
my $self = {};
bless $self => $class;
$attr ||= {};
$attr->{dir} or Carp::croak('usage: CGI::MakeItStatic->check($q, {dir => "data_dir"})');
$attr->{renew_key} ||= "renew";
$attr->{keys} ||= [];
$attr->{forbid} ||= sub {return 0};
$attr->{forbidrenew} ||= sub {return 0};
$attr->{noprint} ||= 0;
$self->{attr} = $attr;
$self->{has_static} = 0;
$self->{output} = '';
( run in 0.498 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )