Dave Cross: Still Munging Data With Perl: Online event - Mar 17 Learn more

#!perl
our $DATE = '2019-01-20'; # DATE
our $VERSION = '0.112'; # VERSION
@ARGV == 1 or die "Usage: $0 <metadata-in-perl-code>\n";
eval "\$meta = $ARGV[0]";
die $@ if $@;
my $res = Perinci::Sub::Wrapper::wrap_sub(sub=>sub{}, meta=>$meta, compile=>0);
die "Can't wrap: $res->[0] - $res->[1]" unless $res->[0] == 200;
dd $res->[2]{meta};
# ABSTRACT: Normalize Rinci function metadata
# PODNAME: normalize-rinci-function-metadata
__END__
=pod
=encoding UTF-8
=head1 NAME
normalize-rinci-function-metadata - Normalize Rinci function metadata
=head1 VERSION
This document describes version 0.112 of normalize-rinci-function-metadata (from Perl distribution App-PerinciUtils), released on 2019-01-20.
=head1 SYNOPSIS
% normalize-rinci-function-metadata '{v=>1.1, args=>{a=>{schema=>"int"}}}'
{
"args" => { a => { schema => ["int", {}, {}] } }, # {0}
"args_as" => "hash", # {1}
"v" => 1.1, # {2}
"x.perinci.sub.wrapper.logs" => [
{ normalize_schema => "1", validate_args => 1, validate_result => 1 }, # .[0]
], # {3}
}
=head1 DESCRIPTION
This script can be used to quickly view the normalized form of a L<Rinci>
function metadata. Both input and output are in the form of Perl code.
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-PerinciUtils>.
=head1 SOURCE
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-PerinciUtils>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=head1 AUTHOR
perlancar <perlancar@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2019, 2017, 2016, 2015 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut