Dancer2-Plugin-ViewCache

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/ViewCache.pm  view on Meta::CPAN

package Dancer2::Plugin::ViewCache;
use Modern::Perl;

our $VERSION = '1.0001'; # VERSION
our $AUTHORITY = 'cpan:CLEARBLT'; # AUTHORITY
# ABSTRACT: Create a code for a guest user to use to view a page
use Dancer2::Plugin;
use Carp;

has base_url => (
   is      => 'ro',
   default => sub {
      my $conf = $_[0]->config->{base_url};

      return $conf;
   }
);

has delete_after_view => (
   is      => 'ro',
   default => sub {
      my $conf = $_[0]->config->{delete_after_view} || 0;

      return $conf;
   }
);

has randomize_code_length => (
   is      => 'ro',
   default => sub {
      my $conf = $_[0]->config->{randomize_code_length} || 0;

      return $conf;
   }
);

has minimum_random_length => (
   is      => 'ro',
   default => sub {
      my $conf = $_[0]->config->{minimum_random_length} || 0;

      return $conf;
   }
);

has maximum_random_length => (
   is      => 'ro',
   default => sub {
      my $conf = $_[0]->config->{maximum_random_length} || 128;

      return $conf;
   }
);

has code => (
   is      => 'ro',
   default => sub {
      my $conf = $_[0]->config->{code};

      return $conf;
   }
);



( run in 0.762 second using v1.01-cache-2.11-cpan-39bf76dae61 )