Group
Extension

Matches 2

perl5i ( M/MS/MSCHWERN/perl5i-v2.13.2.tar.gz, MSCHWERN, 2016; MetaCPAN )
perl5i/lib/perl5i/Meta.pod ( view source; MetaCPAN )
n a string, like Data::Dumper.

=head3 as_json

    my $json = $object->mo->as_json;

Return the contents of the $object as JSON.

=head3 as_yaml

    my $json = $object->mo->as_yaml;

Return the cont
u like.

Possible formats are yaml, json and perl.

$format defaults to "perl" which is equivalent to C<< $object->mo->perl >>.

This is simply the long form of C<as_perl>, C<as_json> and C<as_yaml>.
perl5i ( M/MS/MSCHWERN/perl5i-v2.13.2.tar.gz, MSCHWERN, 2016; MetaCPAN )
perl5i/lib/perl5i/2/Meta/Instance.pm ( view source; MetaCPAN )
  my %args = @_;

    my $format = $args{format} // "perl";
    state $dumpers = {
        json    => "as_json",
        yaml    => "as_yaml",
        perl    => "as_perl",
    };

    my $dumper = $d
for dump()") unless $dumper;

    return $self->$dumper(%args);
}

sub as_json {
    require JSON::MaybeXS;
    my $json = JSON::MaybeXS->new
                    ->utf8
                    ->pretty
  
sed;

    # JSON doesn't seem to have an easy way to say
    # "just dump objects as references please".  This is their
    # recommended way to do it (yarf).
    local *UNIVERSAL::TO_JSON = sub {
   

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