Perinci-Sub-Wrapper
view release on metacpan or search on metacpan
- [Bugfix] When arg/result is stream, check that schema must be
str/buf/array and when schema is array use the schema specified
in its 'of' clause.
0.81 2016-01-22 Released-By: PERLANCAR
- No functional changes.
- Show streaming record (input this time) that fails validation, to
aid debugging.
0.80 2016-01-20 Released-By: PERLANCAR
- No functional changes.
- Show streaming record/sub result that fails validation, to aid
debugging.
- Bump prereq version Log::Any::IfLOG to 0.07.
0.79 2015-09-04 Released-By: PERLANCAR
- No functional changes.
- [dist] Move spec prereqs from RuntimeRequires to
0.71 2015-01-21 Released-By: PERLANCAR
- No functional changes.
- Remove debugging diag().
0.70 2015-01-17 Released-By: PERLANCAR
- Support Rinci 1.1.71: streaming input & output now uses coderef only
(not filehandle or tied array or IO::Handle-like object). We also
support per-record validation of streaming input & output.
0.69 2015-01-16 Released-By: PERLANCAR
- Handle argument validation when stream=1.
0.68 2015-01-11 Released-By: PERLANCAR
- Handle 'result/stream' property, add validation for streaming
result.
0.67 2014-12-10 Released-By: PERLANCAR
- No functional changes.
- Use new name of renamed/split module SHARYANTO::String::Util ->
String::LineNumber.
lib/Perinci/Sub/Wrapper.pm view on Meta::CPAN
}
$self->_add_var($_, $cd->{vars}{$_})
for sort keys %{ $cd->{vars} };
$cd->{result} =~ s/\A\s+//;
$self->push_lines(
"my \$err_$dn;",
"$cd->{result};",
);
if ($argspec->{stream}) {
$self->push_lines(
'if ('."\$err_$dn".') { die "Record #$i of streaming argument '."'$prefix$argname'".' ($rec) fails validation: '."\$err_$dn".'" }',
'$rec;',
);
} else {
$self->_errif(
400, qq["Argument '$prefix$argname' fails validation: \$err_$dn"],
"\$err_$dn");
}
if ($argspec->{meta}) {
$self->push_lines("# check subargs of $prefix$argname");
$self->_handle_args(
( run in 0.243 second using v1.01-cache-2.11-cpan-4d50c553e7e )