Group
Extension

Matches 35359

App-oo_modulino_zsh_completion_helper ( H/HK/HKOBA/App-oo_modulino_zsh_completion_helper-0.07.tar.gz, HKOBA, 2025; MetaCPAN )
App-oo_modulino_zsh_completion_helper/lib/App/oo_modulino_zsh_completion_helper.pm ( view source; MetaCPAN )
n_helper;
use 5.010;
use strict;
use warnings;

our $VERSION = "0.07";

use MOP4Import::Base::CLI_JSON -as_base
  , [fields =>
     [eol => default => "\n"],
     [lib =>
      doc => "library directo
join($self->{eol}, @completion), $self->{eol};
}

sub IGNORE_OPTIONS_FROM {'MOP4Import::Base::CLI_JSON'}

sub zsh_options {
  (my MY $self, my %opts) = @_;

  my ZshParams $opts = \%opts;

  my ($targ
DBD-libsql ( Y/YT/YTURTLE/DBD-libsql-0.05.tar.gz, YTURTLE, 2025; MetaCPAN )
DBD-libsql/lib/DBD/libsql.pm ( view source; MetaCPAN )
ases

use 5.018;
use strict;
use warnings;
use DBI ();
use LWP::UserAgent;
use HTTP::Request;
use JSON;
use Data::Dumper;

our $VERSION = '0.05';
our $drh;

# Global hash to store HTTP clients keyed b
 # Convert to string representation
    $HTTP_CLIENTS{$dbh_id} = {
        ua => $ua,
        json => JSON->new->utf8,
        base_url => $server_url,
        auth_token => $auth_token,
        baton
('POST', "$server_url/v2/pipeline");
        $init_request->header('Content-Type' => 'application/json');
        
        # Add Turso authentication header if token is available
        if ($auth_tok
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/Declare.pm ( view source; MetaCPAN )
);
  my $fields_array = fields_array($opts->{objpkg});

  my $isFirst = not $myPack->JSON_TYPE_HANDLER->lookup_json_type($opts->{objpkg});

  # Import all fields from super class
  foreach my $super_c
gin->clone : $origin;
      };
      push @$fields_array, $name;
    }

    $myPack->JSON_TYPE_HANDLER->inherit_json_type($opts->{objpkg}, $super_class) if $isFirst;

  }

  {
    my %dup;
    foreach
c;
    }
  };

  print STDERR "  FieldSpec is: $field_class\n" if DEBUG;

  $myPack->JSON_TYPE_HANDLER->declare_json_type_record($opts->{objpkg});

  $myPack->declare___field($opts, $field_class, ref 
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/Base/Configure.pm ( view source; MetaCPAN )
ates set hook (onconfigure_FIELDNAME) wrapped with
L<Scalar::Util/weaken>.

=head2 json_type => STRING | Cpanel::JSON::XS::Type

To be documented...

=head1 SEE ALSO

L<MOP4Import::Declare>

=head1 AU
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/intro_runnable_module.pod ( view source; MetaCPAN )
in C<undef>, C<[..]>, C<{..}>...
we must use some kind of serializer such as L<Data::Dumper> or L<JSON>.
Following is a minimum starting point of such subcommand dispatcher:


    use Data::Dumper;
  
is falsy.

=item *
Change output serializer to L<JSON>.

=item *
Change argument parser to convert C<[..]>, C<{...}> automatically
by L<JSON/decode_json> too.
This enables you to compose your favorite
h takes/returns structured objects/arrays.

=back

This is a backstory of L<MOP4Import::Base::CLI_JSON>. Thank you for reading!

=head1 APPENDIX

=head2 Sample implementation of parse_opts()


    sub
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/Opts.pm ( view source; MetaCPAN )
end of MOP4Import handling.
   , 'delayed_tasks'

   # default value for json_type. 'string' if not specified
   , 'default_json_type'

   # Cache to store and keep heavy computation results between p
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/Util.pm ( view source; MetaCPAN )
esult : $result;
}

#
# posix_style long option with JSON support.
#
sub parse_json_opts {
  my ($pack, $list, $result, $alias) = @_;
  require JSON::MaybeXS;
  parse_opts($pack, $list, $result, $alia
d.
      my $copy = $_[0];
      Encode::_utf8_off($copy) if Encode::is_utf8($copy);
      JSON::MaybeXS::JSON()->new->utf8->relaxed->decode($copy);
    } elsif (not Encode::is_utf8($_[0]) and $_[0] =
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/FieldSpec.pm ( view source; MetaCPAN )
 fields
  ('name'
   , 'doc' # documentation
   , 'default'
   , 'no_getter'
   , 'package'
   , 'json_type'
   , 'isa'
   , 'validator'
   , 'zsh_completer'
   , 'extra'
   # file? line? package?
 );
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/Util/Inspector.pm ( view source; MetaCPAN )
t STDERR "Using (file '" . __FILE__ . "')\n" if DEBUG and DEBUG >= 2
}

use MOP4Import::Base::CLI_JSON -as_base
  , [fields =>
     [lib =>
      doc => "library directory list. SCALAR, ARRAY or ':' s
Daje-Plugin-Tools ( J/JA/JANESKIL/Tools/Daje-Plugin-Tools-0.14.tar.gz, JANESKIL, 2025; MetaCPAN )
Daje-Plugin-Tools/lib/Daje/Controller/ToolsTreelist.pm ( view source; MetaCPAN )
ey)->then(sub ($result){
        $self->render(json => { data => $result->{data}, result => => 1 });
    })->catch(sub ($err) {
        $self->render(json => { 'result' => 0, data => $err });
    });
SPVM-Mojolicious ( K/KI/KIMOTO/SPVM-Mojolicious-0.032.tar.gz, KIMOTO, 2025; MetaCPAN )
SPVM-Mojolicious/lib/SPVM/Mojo/Message.pm ( view source; MetaCPAN )
e|SPVM::Mojo::Headers/"max_line_size"> field.

=head2 json

C<method json : object ();>

Decode JSON message body directly using L<JSON|SPVM::JSON> if possible, an C<undef> return value indicates a ba
's a 16MiB limit for requests and a 2GiB limit for responses by default.

  # Extract JSON values
  say $msg->json->(Hash)->get("foo")->(Hash)->get("bar")->(List)->get(23)->(string);

=head2 parse

C<
Daje-Plugin-Tools ( J/JA/JANESKIL/Tools/Daje-Plugin-Tools-0.14.tar.gz, JANESKIL, 2025; MetaCPAN )
Daje-Plugin-Tools/lib/Daje/Controller/ToolsVersion.pm ( view source; MetaCPAN )
oad_full_list_p()->then(sub($result) {
        $self->render(json => $result->{data});
    })->catch(sub($err) {
        $self->render(json => { 'result' => 'failed', data => $err });
    })->wait;
}
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/Base/CLI.pod ( view source; MetaCPAN )
i_run(\@ARGV) unless caller;
  1;


=head1 DESCRIPTION

Now superceded by L<MOP4Import::Base::CLI_JSON>.

MOP4Import::Base::CLI is a general purpose base class to make
L<your module also runnable from
MOP4Import-Declare ( H/HK/HKOBA/MOP4Import-Declare-0.071.tar.gz, HKOBA, 2025; MetaCPAN )
MOP4Import-Declare/Util/CommentedJson.pm ( view source; MetaCPAN )
ackage MOP4Import::Util::CommentedJson;
use strict;
use warnings FATAL => 'all';
use Exporter qw/import/;
use JSON::MaybeXS;
use bytes;

our @EXPORT_OK = qw/strip_json_comments/;

our $re_atom = qr{tr
tring
              }xs;

sub strip_json_comments {
  my ($pack, $bytes) = @_;
  $bytes =~ s/\A\xef\xbb\xbf//; # Strip BOM of utf-8.
  my @region = reverse list_json_comments($pack, $bytes);
  foreach
 ($startPos, $len) = @$region;
    substr($bytes, $startPos, $len, '');
  }
  $bytes;
}

sub list_json_comments {
  my @pos;
  while ($_[1] =~ m{\G(?<ws>\s*+)$re_ALL}g) {
    if (defined $+{comment} a
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/DimensionContentType.pm ( view source; MetaCPAN )
Object::DimensionContentType;

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->{
OrePAN2 ( O/OA/OALDERS/OrePAN2-0.53.tar.gz, OALDERS, 2025; MetaCPAN )
OrePAN2/lib/OrePAN2/Repository/Cache.pm ( view source; MetaCPAN )
e::Spec             ();
use File::stat             qw( stat );
use IO::File::AtomicChange ();
use JSON::PP               ();
use Types::Standard        qw( Bool HashRef Str );
use Types::Path::Tiny   
 my $self = shift;
    return do {
        if ( open my $fh, '<', $self->filename ) {
            JSON::PP->new->utf8->decode(
                do { local $/; <$fh> }
            );
        }
        e
filename {
    my $self = shift;
    return File::Spec->catfile( $self->directory, 'orepan2-cache.json' );
}

sub is_hit {
    my ( $self, $stuff ) = @_;

    my $entry = $self->data->{$stuff};

    r
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/GetLogRecordsResponse.pm ( view source; MetaCPAN )
bject::GetLogRecordsResponse;

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->{
Class-Enumeration ( S/SV/SVW/Class-Enumeration-v1.3.0.tar.gz, SVW, 2025; MetaCPAN )
Class-Enumeration/lib/Class/Enumeration/Builder.pod ( view source; MetaCPAN )
 objects in the list.

=item * C<to_json> (a boolean value; available as of version 1.3.0)

If the C<to_json> option is set to true, the builder creates a C<TO_JSON()>
method (object method). This def
Class-Enumeration ( S/SV/SVW/Class-Enumeration-v1.3.0.tar.gz, SVW, 2025; MetaCPAN )
Class-Enumeration/lib/Class/Enumeration/Builder.pm ( view source; MetaCPAN )
$self }
      }
    }
    if ( delete $options->{ to_json } ) {
      no strict 'refs'; ## no critic ( ProhibitNoStrict )
      *{ "$class\::TO_JSON" } = sub { $_[ 0 ]->name }
    }
  }

  croak "Unkn
WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-13.00.tar.gz, FASTLY, 2025; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Object/DimensionBrowser.pm ( view source; MetaCPAN )
ly::Object::DimensionBrowser;

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->{

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