time_zone => 'local',
);
$dt->set_formatter( $fmt );
return( $dt );
}
sub TO_JSON
{
my $self = shift( @_ );
my $fields = $self->fields;
my $ref = {};
foreach my $m
e string.
=head2 TO_JSON
This method is used so that if the cookie object is part of some data encoded into json, this will convert the cookie data properly to be used by L<JSON>
=head1 SIGNED COOK
use DateTime;
use DateTime::Format::Strptime;
use Module::Generic::File qw( tempfile );
use JSON;
use Net::IDN::Encode ();
use Nice::Try;
use Want;
our $VERSION = 'v0.1.0';
u
{file} = $base->child( 'public_suffix_list.txt' );
$self->{json_file} = Module::Generic::File->sys_tmpdir->child( 'public_suffix.json' );
$self->{meta} = {};
$self->{min_suffix} = 0;
$
w
if( $dont_have_etag && $meta->{etag} )
{
$self->save_as_json || return( $self->pass_error );
}
return( $self );
}
elsi
re APR::Request::Cookie;
}
use Cookie;
use Cookies::Domain;
use DateTime;
use JSON;
use Module::Generic::File qw( file );
use Module::Generic::HeaderValue;
use Nice::Tr
if( defined( $host ) && CORE::length( $host ) );
return( $name );
}
# Load cookie data from json cookie file
sub load
{
my $self = shift( @_ );
my $file = shift( @_ ) || return( $self->e
y $json = $f->load;
return( $self->pass_error( $f->error ) ) if( !defined( $json ) );
# No need to go further
if( !CORE::length( $json ) )
{
# $self->message( 3, "Cookie json f