Skip to content

Commit

Permalink
fix handling of undef, prepare v0.02
Browse files Browse the repository at this point in the history
  • Loading branch information
sharyanto committed Jul 1, 2010
1 parent 8f33815 commit 12a2b23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Changes
@@ -1,5 +1,10 @@
Revision history for Data-Dump-Partial

0.02 2010-07-01

Correct handling of undef.


0.01 2010-06-26

First release.
2 changes: 1 addition & 1 deletion dist.ini
@@ -1,5 +1,5 @@
name = Data-Dump-Partial
version = 0.01
version = 0.02
author = Steven Haryanto <stevenharyanto@gmail.com>
license = Perl_5
copyright_holder = Steven Haryanto
Expand Down
2 changes: 1 addition & 1 deletion lib/Data/Dump/Partial.pm
Expand Up @@ -104,7 +104,7 @@ sub dump_partial {
my $filter = sub {
my ($ctx, $oref) = @_;

if ($opts->{max_len} && $ctx->is_scalar &&
if ($opts->{max_len} && $ctx->is_scalar && defined($$oref) &&
length($$oref) > $opts->{max_len}) {

return { object => substr($$oref, 0, $opts->{max_len}-3)."..." };
Expand Down

0 comments on commit 12a2b23

Please sign in to comment.