Changeset 1505

Show
Ignore:
Timestamp:
08/20/06 18:52:35
Author:
miyagawa
Message:

fixed UUV warning in HEADEnclosureMetadata

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/HEADEnclosureMetadata.pm

    r749 r1505  
    33use base qw( Plagger::Plugin ); 
    44 
     5use File::Basename; 
    56use Plagger::UserAgent; 
    67 
     
    6364        'length' => _header($res, 'Content-Length'), 
    6465        'type'   => _header($res, 'Content-Type'), 
    65         'filename' => _filename($res), 
     66        'filename' => scalar _filename($res), 
    6667    }; 
    6768} 
     
    7778sub _filename { 
    7879    my $res = shift; 
    79     my $value = $res->header('Content-Disposition')
     80    my $value = $res->header('Content-Disposition') or return
    8081 
    81     my $filename = ( $value =~ /; filename=(\S*)/ )[0] or return undef
     82    my $filename = ( $value =~ /; filename=(\S*)/ )[0] or return
    8283    $filename =~ s/^"(.*?)"$/$1/; 
    8384    $filename;