ARGV-Struct
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
{
"abstract" : "Parse complex data structures passed in ARGV",
"author" : [
"Jose Luis Martinez <joseluis.martinez@capside.com>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
---
abstract: 'Parse complex data structures passed in ARGV'
author:
- 'Jose Luis Martinez <joseluis.martinez@capside.com>'
build_requires:
Test::Exception: '0'
Test::More: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010'
license: perl
Makefile.PL view on Meta::CPAN
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012.
use strict;
use warnings;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Parse complex data structures passed in ARGV",
"AUTHOR" => "Jose Luis Martinez <joseluis.martinez\@capside.com>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "ARGV-Struct",
"EXE_FILES" => [
"bin/argvstruct"
],
"LICENSE" => "perl",
"NAME" => "ARGV::Struct",
# NAME
ARGV::Struct - Parse complex data structures passed in ARGV
# SYNOPSIS
use ARGV::Struct;
my $struct = ARGV::Struct->new->parse;
# DESCRIPTION
Have you ever felt that you need something different than Getopt?
Are you tired of shoehorning Getopt style arguments into your commandline scripts?
Are you trying to express complex datastructures via command line?
then ARGV::Struct is for you!
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
lib/ARGV/Struct.pm view on Meta::CPAN
} else {
die "Expecting { or [";
}
}
1;
#################### main pod documentation begin ###################
=head1 NAME
ARGV::Struct - Parse complex data structures passed in ARGV
=head1 SYNOPSIS
use ARGV::Struct;
my $struct = ARGV::Struct->new->parse;
=head1 DESCRIPTION
Have you ever felt that you need something different than Getopt?
Are you tired of shoehorning Getopt style arguments into your commandline scripts?
Are you trying to express complex datastructures via command line?
then ARGV::Struct is for you!
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
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.126 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )