Group
Extension

Matches 1

Getopt-Compact-WithCmd ( X/XA/XAICRON/Getopt-Compact-WithCmd-0.22.tar.gz, XAICRON, 2014; MetaCPAN )
Getopt-Compact-WithCmd/lib/Getopt/Compact/WithCmd.pm ( view source; MetaCPAN )
se JSON;
  use Data::Dumper;

  Getopt::Compact::WithCmd->add_type(JSON => Str => sub { decode_json(shift) });
  my $go = Getopt::Compact::WithCmd->new(
      global_struct => {
          from_json =>
 {
              type => 'JSON',
          },
      },
  );
  my $data = $go->opts->{from_json};
  print Dumper $data;

  # will run cmd:
  $ ./add_type.pl --from_json '{"foo":"bar"}'
  $VAR1 = {
    

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