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}        = '';

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

( run in 0.972 second using v1.00-cache-1.14-grep-28634ff-cpan-ac32402124b )