App-SerializeUtils

 view release on metacpan or  search on metacpan

script/json2json  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/json2json  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/json2json  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: json2json

__END__

=pod

=encoding UTF-8

script/json2json  view on Meta::CPAN

json2json - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of json2json (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/json2perl  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/json2perl  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/json2perl  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: json2perl

__END__

=pod

=encoding UTF-8

script/json2perl  view on Meta::CPAN

json2perl - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of json2perl (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/json2perlcolor  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/json2perlcolor  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/json2perlcolor  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: json2perlcolor

__END__

=pod

=encoding UTF-8

script/json2perlcolor  view on Meta::CPAN

json2perlcolor - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of json2perlcolor (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/json2phpser  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/json2phpser  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/json2phpser  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: json2phpser

__END__

=pod

=encoding UTF-8

script/json2phpser  view on Meta::CPAN

json2phpser - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of json2phpser (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/json2sereal  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/json2sereal  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/json2sereal  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: json2sereal

__END__

=pod

=encoding UTF-8

script/json2sereal  view on Meta::CPAN

json2sereal - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of json2sereal (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/json2sexp  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/json2sexp  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/json2sexp  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: json2sexp

__END__

=pod

=encoding UTF-8

script/json2sexp  view on Meta::CPAN

json2sexp - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of json2sexp (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/json2storable  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/json2storable  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/json2storable  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: json2storable

__END__

=pod

=encoding UTF-8

script/json2storable  view on Meta::CPAN

json2storable - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of json2storable (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/json2yaml  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/json2yaml  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/json2yaml  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: json2yaml

__END__

=pod

=encoding UTF-8

script/json2yaml  view on Meta::CPAN

json2yaml - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of json2yaml (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/perl2json  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/perl2json  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/perl2json  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: perl2json

__END__

=pod

=encoding UTF-8

script/perl2json  view on Meta::CPAN

perl2json - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of perl2json (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/perl2perl  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/perl2perl  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/perl2perl  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: perl2perl

__END__

=pod

=encoding UTF-8

script/perl2perl  view on Meta::CPAN

perl2perl - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of perl2perl (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/perl2perlcolor  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/perl2perlcolor  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/perl2perlcolor  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: perl2perlcolor

__END__

=pod

=encoding UTF-8

script/perl2perlcolor  view on Meta::CPAN

perl2perlcolor - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of perl2perlcolor (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/perl2phpser  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/perl2phpser  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/perl2phpser  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: perl2phpser

__END__

=pod

=encoding UTF-8

script/perl2phpser  view on Meta::CPAN

perl2phpser - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of perl2phpser (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/perl2sereal  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/perl2sereal  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/perl2sereal  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: perl2sereal

__END__

=pod

=encoding UTF-8

script/perl2sereal  view on Meta::CPAN

perl2sereal - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of perl2sereal (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/perl2sexp  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/perl2sexp  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/perl2sexp  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: perl2sexp

__END__

=pod

=encoding UTF-8

script/perl2sexp  view on Meta::CPAN

perl2sexp - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of perl2sexp (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/perl2storable  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/perl2storable  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/perl2storable  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: perl2storable

__END__

=pod

=encoding UTF-8

script/perl2storable  view on Meta::CPAN

perl2storable - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of perl2storable (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/perl2yaml  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/perl2yaml  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/perl2yaml  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: perl2yaml

__END__

=pod

=encoding UTF-8

script/perl2yaml  view on Meta::CPAN

perl2yaml - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of perl2yaml (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/phpser2json  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/phpser2json  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/phpser2json  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: phpser2json

__END__

=pod

=encoding UTF-8

script/phpser2json  view on Meta::CPAN

phpser2json - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of phpser2json (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/phpser2perl  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/phpser2perl  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/phpser2perl  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: phpser2perl

__END__

=pod

=encoding UTF-8

script/phpser2perl  view on Meta::CPAN

phpser2perl - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of phpser2perl (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/phpser2perlcolor  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/phpser2perlcolor  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/phpser2perlcolor  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: phpser2perlcolor

__END__

=pod

=encoding UTF-8

script/phpser2perlcolor  view on Meta::CPAN

phpser2perlcolor - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of phpser2perlcolor (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/phpser2sereal  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/phpser2sereal  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/phpser2sereal  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: phpser2sereal

__END__

=pod

=encoding UTF-8

script/phpser2sereal  view on Meta::CPAN

phpser2sereal - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of phpser2sereal (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/phpser2sexp  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/phpser2sexp  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/phpser2sexp  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: phpser2sexp

__END__

=pod

=encoding UTF-8

script/phpser2sexp  view on Meta::CPAN

phpser2sexp - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of phpser2sexp (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/phpser2storable  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/phpser2storable  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/phpser2storable  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: phpser2storable

__END__

=pod

=encoding UTF-8

script/phpser2storable  view on Meta::CPAN

phpser2storable - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of phpser2storable (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/phpser2yaml  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/phpser2yaml  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/phpser2yaml  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: phpser2yaml

__END__

=pod

=encoding UTF-8

script/phpser2yaml  view on Meta::CPAN

phpser2yaml - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of phpser2yaml (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/sereal2json  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/sereal2json  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/sereal2json  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: sereal2json

__END__

=pod

=encoding UTF-8

script/sereal2json  view on Meta::CPAN

sereal2json - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of sereal2json (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/sereal2perl  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/sereal2perl  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/sereal2perl  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: sereal2perl

__END__

=pod

=encoding UTF-8

script/sereal2perl  view on Meta::CPAN

sereal2perl - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of sereal2perl (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/sereal2perlcolor  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/sereal2perlcolor  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/sereal2perlcolor  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: sereal2perlcolor

__END__

=pod

=encoding UTF-8

script/sereal2perlcolor  view on Meta::CPAN

sereal2perlcolor - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of sereal2perlcolor (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/sereal2phpser  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/sereal2phpser  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/sereal2phpser  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: sereal2phpser

__END__

=pod

=encoding UTF-8

script/sereal2phpser  view on Meta::CPAN

sereal2phpser - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of sereal2phpser (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/sereal2sexp  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/sereal2sexp  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/sereal2sexp  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: sereal2sexp

__END__

=pod

=encoding UTF-8

script/sereal2sexp  view on Meta::CPAN

sereal2sexp - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of sereal2sexp (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/sereal2storable  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/sereal2storable  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/sereal2storable  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: sereal2storable

__END__

=pod

=encoding UTF-8

script/sereal2storable  view on Meta::CPAN

sereal2storable - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of sereal2storable (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.

script/sereal2yaml  view on Meta::CPAN

        ($to eq 'perlcolor' || $to eq 'json' ? 1:0);
    $Opts{dumper} //=
        $Opts{compact} ? 'Data::Dmp' :
        $to eq 'perlcolor' || $Opts{color} ? 'Data::Dump::Color' :
        'Data::Dump';
    #use DD; print "to=$to\n"; dd \%Opts;

} # GET_OPTIONS

my $code_from;
PARSE_INPUT: {
    undef $/;
    if ($from =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{safe}) {
            require Data::Undump;
            $code_from = 'Data::Undump::undump(scalar <>)';
        } else {
            $code_from = 'eval scalar <>';
        }
    } elsif ($from eq 'json') {
        require JSON::MaybeXS;

script/sereal2yaml  view on Meta::CPAN

    } elsif ($from eq 'storable') {
        require Storable;
        $code_from = 'Storable::thaw(scalar <>)';
    } elsif ($from eq 'yaml') {
        no warnings 'once';
        require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
        $code_from = 'YAML::Syck::Load(scalar <>)';
    } else {
        die "serializeutils-convert: Can't convert from '$from'\n";
    }
} # PARSE_INPUT

my $code_to;
OUTPUT: {
    if ($to =~ /\A(perl|perlcolor)\z/) {
        if ($Opts{dumper} eq 'Data::Dump::Color') {
            require Data::Dump::Color;
            $code_to = "Data::Dump::Color::dump($code_from)";
        } elsif ($Opts{dumper} eq 'Data::Dump') {
            require Data::Dump;
            $code_to = "Data::Dump::dump($code_from)";
        # commented out, not released yet
        #} elsif ($Opts{dumper} eq 'Data::Bahe') {
        #    require Data::Bahe;

script/sereal2yaml  view on Meta::CPAN

            no warnings 'once';
            require YAML::Syck; $YAML::Syck::ImplicitTyping = 1;
            $code_to = "YAML::Syck::Dump($code_from)";
        }
    } else {
        die "serializeutils-convert: Can't convert to '$to'\n";
    }

    eval "print $code_to"; ## no critic: BuiltinFunctions::ProhibitStringyEval
    die if $@;
} # OUTPUT

# ABSTRACT: Convert between serialization formats
# PODNAME: sereal2yaml

__END__

=pod

=encoding UTF-8

script/sereal2yaml  view on Meta::CPAN

sereal2yaml - Convert between serialization formats

=head1 VERSION

This document describes version 0.165 of sereal2yaml (from Perl distribution App-SerializeUtils), released on 2022-03-20.

=head1 SYNOPSIS

Usage:

 % serializeutils-convert [OPTIONS] < INPUT-FILE

For example, when called as C<json2yaml>:

 % script-that-outputs-json | json2yaml

=head1 DESCRIPTION

This script can be called as various names to convert between serialization
formats.



( run in 0.773 second using v1.01-cache-2.11-cpan-64827b87656 )