Subject: | "qw/" is closed in $use_line |
In line 60:
----
$use_line .= " qw/" . join(' ', @items) if @items;
----
"qw/" is not closed in above code, it should be:
----
$use_line .= " qw/" . join(' ', @items) . "/" if @items;
----
and I think it's better to attach every "use FOO;" code after "package
BAR;", otherwise, module like Data::Dumper won't work.
A modification is:
------
69 if(open my $fh, "<", $full) {
*70 my @lines = " ";
71 return ($fh, sub {
72 if(@lines) {
73 push @lines, $_;
74 $_ = shift @lines;
*75 $_.= $use_line if /^\s*package\s+.+\s*;\s*$/;
76 return length $_;
77 }
78 return 0;
79 });
------
lines begin with * are modified/added.