App-PackUtils
view release on metacpan or search on metacpan
Usage:
perl_unpack(%args) -> any
Unpack() string.
This function is not exported.
Arguments ('*' denotes required arguments):
* escaped_string => *str*
* string => *str*
* template* => *str*
Return value: (any)
HOMEPAGE
Please visit the project's homepage at
<https://metacpan.org/release/App-PackUtils>.
lib/App/PackUtils.pm view on Meta::CPAN
args => {
template => {
schema => 'str*',
req => 1,
pos => 0,
},
string => {
schema => 'str*',
pos => 1,
},
escaped_string => {
schema => 'str*',
cmdline_aliases => {e=>{}},
},
},
args_rels => {
req_one => ['string', 'escaped_string'],
},
'cmdline.default_format' => 'perl',
result_naked => 1,
};
sub perl_unpack {
my %args = @_;
[unpack($args{template}, @{ exists $args{string} ? $args{string} : eval($args{escaped_string}) })];
}
$SPEC{perl_pack_template_is_fixed_size} = {
v => 1.1,
summary => 'Check if a Perl pack() template specifies a fixed-size data',
args => {
template => {
schema => 'str*',
req => 1,
pos => 0,
lib/App/PackUtils.pm view on Meta::CPAN
perl_unpack(%args) -> any
Unpack() string.
This function is not exported.
Arguments ('*' denotes required arguments):
=over 4
=item * B<escaped_string> => I<str>
=item * B<string> => I<str>
=item * B<template>* => I<str>
=back
Return value: (any)
=head1 HOMEPAGE
script/perl-unpack view on Meta::CPAN
% perl-unpack [options] <template> [string]
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--escaped-string>=I<s>, B<-e>
=item B<--string>=I<s>
=item B<--template>=I<s>*
=back
=head2 Configuration options
=over
script/perl-unpack view on Meta::CPAN
To disable searching for configuration files, pass C<--no-config>.
You can put multiple profiles in a single file by using section names like C<[profile=SOMENAME]> or C<[SOMESECTION profile=SOMENAME]>. Those sections will only be read if you specify the matching C<--config-profile SOMENAME>.
You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...
Finally, you can filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOME...
List of available configuration parameters:
escaped_string (see --escaped-string)
format (see --format)
naked_res (see --naked-res)
string (see --string)
template (see --template)
=head1 ENVIRONMENT
=head2 PERL_UNPACK_OPT => str
Specify additional command-line options.
( run in 0.435 second using v1.01-cache-2.11-cpan-c21f80fb71c )