Group
Extension

Matches 32

Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/Iterator/Element.pod ( view source; MetaCPAN )
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
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/Boolean.pm ( view source; MetaCPAN )
 $self );
    }
    else
    {
        CORE::return( $class->new( $str ) );
    }
}

sub TO_JSON
{
    # JSON does not check that the value is a proper true or false. It stupidly assumes this is a str
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/DateTime/Interval.pod ( view source; MetaCPAN )
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> is supported by this package. To th
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/File/Cache.pm ( view source; MetaCPAN )
Nice::Try;
    # This is disruptive for everybody. Bad idea.
    # use JSON 4.03 qw( -convert_blessed_universally );
    use JSON 4.03;
    use Scalar::Util ();
    # use Storable 3.25 ();
    use Sto
sing it as a choice to the user, but defaults to JSON.
    # Other possibilities could be cbor, sereal and storable
    $self->{_packing_method} = 'json';
    $self->SUPER::init( @_ ) || return( $self
        ) );
}

sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }

sub json { return( shift->_packing_method( 'json' ) ); }

sub key
{
    my $self = shift( @_ );
    if( @_ )
    {
        $se
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/SharedMemXS.pm ( view source; MetaCPAN )
::Util ();
    # This is disruptive for everybody. Bad idea.
    # use JSON 4.03 qw( -convert_blessed_universally );
    use JSON 4.03;
    use Module::Generic::Global ':const';
    use Storable::Impr

    # I leave the feature of using it as a choice to the user, but defaults to JSON
    $self->{_packing_method} = 'json';
    $self->SUPER::init( @_ ) || return( $self->pass_error );
    $self->{own
$self->error( "Error with \$shm->id: $@" ) );
    }
    return( $rv );
}

sub json { return( shift->_packing_method( 'json' ) ); }

sub key
{
    my $self = shift( @_ );
    if( @_ )
    {
        my 
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/Hash.pod ( view source; MetaCPAN )
 }

    $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
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/DateTime.pm ( view source; MetaCPAN )
 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
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/SharedMem.pod ( view source; MetaCPAN )
 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
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/Dynamic.pm ( view source; MetaCPAN )
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
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/Exception.pm ( view source; MetaCPAN )
se
    {
        $new = CORE::bless( $hash => $class );
    }
    CORE::return( $new );
}

sub TO_JSON { return( shift->as_string ); }

sub UNIVERSAL::exception
{
    my $class = shift( @_ );
    my $
om.example.api",
        locale   => 'ja-JP',
        path     => "/home/joe/locale",
        use_json => 1,
    }) || die( Text::PO::Gettext->error, "\n" );

    my $message = $po->gettext( "Somethin
nd call L<perlfunc/"die"> with it.

=head2 TO_JSON

Special method called by L<JSON> to transform this object into a string suitable to be added in a json data.

=head2 trace

Set or get the L<Devel::
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic/Dynamic.pod ( view source; MetaCPAN )
> 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
Module-Generic ( J/JD/JDEGUEST/Module-Generic-v1.1.3.tar.gz, JDEGUEST, 2025; MetaCPAN )
Module-Generic/lib/Module/Generic.pm ( view source; MetaCPAN )
uV`; do echo "sub $sub;"; done
sub AUTOLOAD;
sub DEBUG;
sub DESTROY;
sub FREEZE;
sub THAW;
sub TO_JSON;
sub VERBOSE;
sub as_hash;
sub clear;
sub clear_error;
sub clone;
sub coloured;
sub colour_close;
ub new;
sub new_array;
sub new_datetime;
sub new_file;
sub new_glob;
sub new_hash;
sub new_json;
sub new_json_safe;
sub new_null;
sub new_number;
sub new_scalar;
sub new_tempdir;
sub new_tempfile;
sub
vided to deserialise with $class." ) );
        }
    }
    # NOTE: deserialise with JSON
    elsif( $class eq 'JSON' )
    {
        my @options = qw(
            allow_blessed allow_nonref allow_unk

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.