diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-03-04 17:13:18 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-03-04 17:13:18 +0100 |
commit | 97ea33ec84ab05d8c2ac1cf669d90f3d81b835f4 (patch) | |
tree | 708916949404d5b7d4d40e4640b85ec575f317d9 /lib | |
parent | 8355e11c04784b90f343dfc6b835eb7aa9d37e6e (diff) |
App::Dthumb::Data get: Return undef for invalid files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/Dthumb/Data.pm.PL | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/App/Dthumb/Data.pm.PL b/lib/App/Dthumb/Data.pm.PL index 6ebea05..eaf914e 100644 --- a/lib/App/Dthumb/Data.pm.PL +++ b/lib/App/Dthumb/Data.pm.PL @@ -123,7 +123,8 @@ sub list_archived { =head2 get($filename) -Returns the exact content of share/$filename. +Returns the exact content of share/$filename (undef if no such file was +saved). =cut @@ -133,7 +134,7 @@ sub get { my $data = $self->section_data($name); if (not $data) { - die("No such data: ${name}\n"); + return undef; } $data = ${$data}; |