Codebase list libcpan-uploader-perl / d116c49
do not try to upload directories yeesh Ricardo Signes 7 years ago
3 changed file(s) with 11 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
00 Revision history for CPAN-Uploader
11
22 {{$NEXT}}
3 - the cpan-uploader program now skips directories, while the
4 upload_file method throws an exception on non-files; thanks to
5 Vincent Pit for reporting the weird behavior when trying to upload a
6 directory
37
48 0.103012 2015-12-31 21:41:09-05:00 America/New_York
59 - don't chomp undef (Graham Knop)
121121 my $md5;
122122
123123 foreach my $file (@ARGV) {
124 unless (-f $file) {
125 warn "skipping non-file $file\n";
126 next;
127 }
128
124129 my $ok = eval {
125130 CPAN::Uploader->upload_file(
126131 $file,
4747
4848 Carp::confess(q{don't supply %arg when calling upload_file on an object})
4949 if $arg and ref $self;
50
51 Carp::confess(q{attempted to upload a non-file}) unless -f $file;
5052
5153 # class call with no args is no good
5254 Carp::confess(q{need to supply %arg when calling upload_file from the class})