ARGV-Struct

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.01 2015-01-27 00:30:00
 - First version
0.02 2015-02-04 21:30:00
 - Breakage: now the arguments are JSONY compatible
   (thanks to Matt S Trout for the suggestion)
 - Refactor parsing code
 - Better errors
 - More tests
0.03 2015-08-05 23:45:00
 - Compatibility with pre 5.14 Perls (GH Issue #1)
0.04 2018-09-18 22:33:00
 - Migrate to Moo and Type::Tiny
0.05 2018-09-18 23:10:00
 - Changes to dist.ini resulted in Makefile.PL not being generated

META.json  view on Meta::CPAN

         "web" : "https://github.com/pplu/argv-struct/issues"
      },
      "repository" : {
         "type" : "git",
         "url" : "https://github.com/pplu/argv-struct.git",
         "web" : "https://github.com/pplu/argv-struct"
      }
   },
   "version" : "0.06",
   "x_generated_by_perl" : "v5.28.0",
   "x_serialization_backend" : "Cpanel::JSON::XS version 4.08"
}

README.md  view on Meta::CPAN


It's designed so the users of your command line utilities won't hate you when things
get complex.

# THE PAIN

I've had to use some command-line utilities that had to do creative stuff to transmit
deeply nested arguments, or datastructure-like information. Here are some strategies that
I've found over time: 

## Complex arguments codified as JSON

JSON is horrible for the command line because you have to escape the quotes. It's a nightmare.

    command --complex_arg "{\"key1\":\"value1\",\"key2\":\"value2\"}"

## Arguments encoded via some custom scheme

These schemes fail when you have to make values complex (lists, or other key/values)

    command --complex_arg key1,value1:key2,value2

## Repeating Getopt arguments

README.md  view on Meta::CPAN


Try to combine with Getopt/MooseX::Getopt, so some parameters could be an ARGV::Struct. The
rest would be parsed Getopt style.

# CONTRIBUTE

The source code and issues are on https://github.com/pplu/ARGV-Struct

# THANKS

Matt S. Trout for suggesting that ARGV::Struct syntax be JSONY compatible

# AUTHOR

    Jose Luis Martinez
    CPAN ID: JLMARTIN
    CAPSiDE
    jlmartinez@capside.com
    http://www.pplusdomain.net

# COPYRIGHT

dist.ini  view on Meta::CPAN

exclude_match=dzil-local
exclude_match=cpanfile.snapshot

[MakeMaker]

[ExecDir]

[VersionFromMainModule]

[MetaYAML]
[MetaJSON]

[MetaResources]
repository.web = https://github.com/pplu/argv-struct
repository.url = https://github.com/pplu/argv-struct.git
repository.type = git
bugtracker.web = https://github.com/pplu/argv-struct/issues

[License]

[RunExtraTests]

lib/ARGV/Struct.pm  view on Meta::CPAN


It's designed so the users of your command line utilities won't hate you when things
get complex.

=head1 THE PAIN

I've had to use some command-line utilities that had to do creative stuff to transmit
deeply nested arguments, or datastructure-like information. Here are some strategies that
I've found over time: 

=head2 Complex arguments codified as JSON

JSON is horrible for the command line because you have to escape the quotes. It's a nightmare.

  command --complex_arg "{\"key1\":\"value1\",\"key2\":\"value2\"}"

=head2 Arguments encoded via some custom scheme

These schemes fail when you have to make values complex (lists, or other key/values)

  command --complex_arg key1,value1:key2,value2

=head2 Repeating Getopt arguments

lib/ARGV/Struct.pm  view on Meta::CPAN


Try to combine with Getopt/MooseX::Getopt, so some parameters could be an ARGV::Struct. The
rest would be parsed Getopt style.

=head1 CONTRIBUTE

The source code and issues are on https://github.com/pplu/ARGV-Struct

=head1 THANKS

Matt S. Trout for suggesting that ARGV::Struct syntax be JSONY compatible

=head1 AUTHOR

    Jose Luis Martinez
    CPAN ID: JLMARTIN
    CAPSiDE
    jlmartinez@capside.com
    http://www.pplusdomain.net

=head1 COPYRIGHT



( run in 1.323 second using v1.01-cache-2.11-cpan-140bd7fdf52 )