diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2012-05-23 14:50:31 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-23 17:59:22 -0700 |
commit | 21361d0729743e699b2954b542f05a2e4eabd980 (patch) | |
tree | b4f46494969725415a45b9c85172af1ba8cf0d24 /time64.c | |
parent | 909564a7d63dd41ca03b7bc9659d8c7b695220d2 (diff) | |
download | perl-21361d0729743e699b2954b542f05a2e4eabd980.tar.gz |
[perl #60204] Unhelpful error message from unpack
Nigel Sandever said:
> The error message produced by the following snippets is very unhelpful:
>
> c:\>perl -wle"print unpack 'v/a*', qq[a]"
> '/' must follow a numeric type in unpack at -e line 1.
>
> c:\>perl -wle"print unpack 'v/a*', ''"
> '/' must follow a numeric type in unpack at -e line 1.
>
> c:\>perl -wle"print unpack 'v/a*', ' '"
> '/' must follow a numeric type in unpack at -e line 1.
The "problem" is that the data string is too short. But
unpack doesn't generate a warning (or croak) in this case
for simple patterns:
mhx@r2d2 $ perl -MData::Dumper -we'print Dumper([unpack "n", "a"])'
$VAR1 = [];
So, I'd say your code should just behave in exactly the
same way. No warning, no return values.
Diffstat (limited to 'time64.c')
0 files changed, 0 insertions, 0 deletions