/[gentoo-perl]/g-cpan/trunk/bin/g-cpan
Gentoo

Diff of /g-cpan/trunk/bin/g-cpan

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 124 Revision 125
189 my $cat_read = IO::File->new($cat_file, '<'); 189 my $cat_read = IO::File->new($cat_file, '<');
190 if (defined $cat_read) { 190 if (defined $cat_read) {
191 my $data = <$cat_read>; 191 my $data = <$cat_read>;
192 undef $cat_read; 192 undef $cat_read;
193 autoflush STDOUT 1; 193 autoflush STDOUT 1;
194 unless (grep "gcpan", $data) { 194 unless ( $data =~ m{gcpan}gmxi ) {
195 my $cat_write = IO::File->new($cat_file, '>>'); 195 my $cat_write = IO::File->new($cat_file, '>>');
196 if (defined $cat_write) { 196 if (defined $cat_write) {
197 print $cat_write "perl-gcpan"; 197 print $cat_write "perl-gcpan\n";
198 undef $cat_write; 198 undef $cat_write;
199 autoflush STDOUT 1; 199 autoflush STDOUT 1;
200 } else { 200 } else {
201 print_err("Insufficient permissions to edit /etc/portage/categories"); 201 print_err("Insufficient permissions to edit /etc/portage/categories");
202 print_err("Please run $prog as a user with sufficient permissions"); 202 print_err("Please run $prog as a user with sufficient permissions");

Legend:
Removed from v.124  
changed lines
  Added in v.125

  ViewVC Help
Powered by ViewVC 1.1.20