ORE::stat( $file )];
return( $self );
}
# This class does not convert to an HASH, but the TO_JSON method will convert to a string
sub as_hash { return( $_[0] ); }
sub atime
{
my $self = shif
se
{
$new = CORE::bless( $hash => $class );
}
CORE::return( $new );
}
sub TO_JSON { CORE::return( CORE::shift->filepath ); }
sub _datetime
{
my $self = shift( @_ );
my $t
STORABLE_freeze
=for Pod::Coverage STORABLE_thaw
=for Pod::Coverage THAW
=for Pod::Coverage TO_JSON
Serialisation by L<CBOR|CBOR::XS>, L<Sereal> and L<Storable::Improved> (or the legacy L<Storable
> to return a L<Module::Generic::Number> object.
=item * C<object>
For blessed objects (e.g., L<JSON::PP::Boolean>, L<Module::Generic::File>, custom classes), uses the appropriate handler (e.g., L<M
d name patterns (e.g., C<is_active> for boolean, C<url> for URI).
=item * Argument types (e.g., L<JSON::PP::Boolean>, hash, array, scalar).
=item * Value formats (e.g., UUID, IP address, file path).
_JSON
Serialisation is supported for L<CBOR|CBOR::XS>, L<Sereal>, L<Storable::Improved>, and L<Storable>. The module implements C<FREEZE>, C<THAW>, C<STORABLE_freeze>, C<STORABLE_thaw>, and C<TO_JSON
ref( $this ) || $this ) )->init( @_ ) );
}
# This class does not convert to an HASH, but the TO_JSON method will convert to a string
sub as_hash { return( $_[0] ); }
sub as_string { return( shift->
se
{
$new = CORE::bless( $hash => $class );
}
CORE::return( $new );
}
sub TO_JSON
{
my $self = CORE::shift( @_ );
CORE::return( '' ) if( !$self->{dt} || !Scalar::Util::ble
DateTime> object to be thawed and frozen and converted to L<JSON> with the respective methods C<STORABLE_freeze>, C<STORABLE_thaw>, C<TO_JSON>
All other method calls not in this API are passed to L<D
set by L</flags> which are used by L</open>.
=item * C<json>
Provided with a value (true or false does not matter), and this will set L<JSON> as the data serialisation mechanism when storing data t
* C<serialiser>
You can provide the serialiser with this option. Possible values are: C<cbor>, C<json>, C<sereal>, C<storable>
=item * C<size>
The size in byte of the shared memory.
This is set on
my $s = $shmem->open || die( $shmem->error );
my $id = $s->id;
=head2 json
When called, this will set L<JSON> as the data serialisation mechanism when storing data to memory or reading dat
length( $clean_field ) );
my( $func_name, $pl );
if( $hash->{ $k }->isa('JSON::PP::Boolean') ||
$hash->{ $k }->isa('Module::Generic::Boolean') )
{
se
{
$new = CORE::bless( $hash => $class );
}
CORE::return( $new );
}
sub TO_JSON
{
my $self = CORE::shift( @_ );
my $ref = { %$self };
CORE::delete( $ref->{_data} );
f( $self->_is_object( $$first_arg ) )
{
if( $self->_is_a( $$first_arg => [qw( JSON::PP::Boolean Module::Generic::Boolean )] ) )
{
$handler = '_set_get_b
STORABLE_freeze
=for Pod::Coverage STORABLE_thaw
=for Pod::Coverage THAW
=for Pod::Coverage TO_JSON
Serialisation by L<CBOR|CBOR::XS>, L<Sereal> and L<Storable::Improved> (or the legacy L<Storable
}
$h->json({ pretty => 1 });
# Produces
{
"age" : 30,
"email" : "john.doe@example.com",
"first_name" : "John",
"last_name" : "Doe"
}
# Or
$h->json
# Produ
reference containing a copy of the current object data.
=head2 as_json
Returns a json representation of the hash by calling L</json>
=head2 as_string
Return a string version of the hash as produce
lse otherwise.
=head2 json
This returns a L<JSON> representation of the hash. You can provided optionally an hash reference of parameters.
All parameters supported by L</JSON> can be used here.
Fo
STORABLE_freeze
=for Pod::Coverage STORABLE_thaw
=for Pod::Coverage THAW
=for Pod::Coverage TO_JSON
Serialisation by L<CBOR|CBOR::XS>, L<Sereal> and L<Storable::Improved> (or the legacy L<Storable
{
$new = CORE::return( $class->new( $str ) );
}
CORE::return( $new );
}
sub TO_JSON { CORE::return( ${$_[0]} ); }
# NOTE: Module::Generic::RegexpCapture package
{
package
;
use vars qw( $VERSION $DEBUG $KEY_OBJECT );
use Clone ();
use Data::Dumper;
use JSON;
use Module::Generic::TieHash;
use Regexp::Common;
use Wanted;
use overload (
already an hash, so no need to do anything.
# To convert to a regular hash as needed by JSON, the method TO_JSON can be used.
sub as_hash
{
my $self = shift( @_ );
if( @_ )
{
my $o
{ %$self };
return( $ref );
}
}
return( $self );
}
sub as_json { return( shift->json(@_)->scalar ); }
sub as_string { return( shift->dump ); }
sub chomp
{
my $self =
}
}
sub FREEZE
{
my( $self, $serialiser ) = @_;
# $serialiser is 'JSON' for example.
return( $self->TO_JSON );
}
sub STORABLE_freeze
{
my( $self, $is_cloning ) = @_;
my $data
( keys( %$ref ) )
{
$hash{ $k } = $ref->{ $k };
}
return( $self );
}
sub TO_JSON
{
my $self = shift( @_ );
my $data = $self->{data};
my $repo = $self->{object_repo};
STORABLE_freeze
=for Pod::Coverage STORABLE_thaw
=for Pod::Coverage THAW
=for Pod::Coverage TO_JSON
Serialisation by L<CBOR|CBOR::XS>, L<Sereal> and L<Storable::Improved> (or the legacy L<Storable
shift->_func( 'asin', { posix => 1 } ) ); }
# This class does not convert to an HASH, but the TO_JSON method will convert to a string
sub as_hash { return( $_[0] ); }
sub atan { return( shift->_func
se
{
$new = CORE::bless( $hash => $class );
}
CORE::return( $new );
}
sub TO_JSON { return( shift->as_string ); }
# NOTE: package Module::Generic::NumberSpecial
package Module::G
ct::TypeServiceAuthorization;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
ce::Fastly::Object::AclEntry;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
t::LoggingNewrelicAdditional;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
y::Object::ServiceInvitation;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
:UpdateBillingAddressRequest;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
lationshipMemberTlsDnsRecord;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $
serialize the data
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
my $_json_attribute = $self->attribute_map->{$_key};
my $_is_nullable = ($self->openapi_nullable->{
e::Fastly::Object::PurgeKeys;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON::MaybeXS qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Da
se ("Class::Accessor", "Class::Data::Inheritable");
#
#Purge multiple surrogate key tags using a JSON POST body. Not required if the `Surrogate-Key` header is specified.
#
# NOTE: This clas
f = shift;
my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self));
return $_hash;
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $