Skip to content

Commit

Permalink
No evident need for 'for' loop in assignment from $args{filename}.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeenan committed Apr 3, 2010
1 parent b0391c8 commit 336ad79
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions lib/ExtUtils/ParseXS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,20 @@ sub process_file {
$self->{WantLineNumbers} = $args{linenumbers};
$self->{IncludedFiles} = {};

for my $f ($args{filename}) {
die "Missing required parameter 'filename'" unless $f;
$self->{filepathname} = $f;
($self->{dir}, $self->{filename}) = (dirname($f), basename($f));
$self->{filepathname} =~ s/\\/\\\\/g;
$self->{IncludedFiles}->{$f}++;
}
# for my $f ($args{filename}) {
# die "Missing required parameter 'filename'" unless $f;
# $self->{filepathname} = $f;
# ($self->{dir}, $self->{filename}) = (dirname($f), basename($f));
# $self->{filepathname} =~ s/\\/\\\\/g;
# $self->{IncludedFiles}->{$f}++;
# }

die "Missing required parameter 'filename'" unless $args{filename};
$self->{filepathname} = $args{filename};
($self->{dir}, $self->{filename}) =
(dirname($args{filename}), basename($args{filename}));
$self->{filepathname} =~ s/\\/\\\\/g;
$self->{IncludedFiles}->{$args{filename}}++;

# Open the output file if given as a string. If they provide some
# other kind of reference, trust them that we can print to it.
Expand Down

0 comments on commit 336ad79

Please sign in to comment.