~ubuntu-branches/ubuntu/utopic/libclass-accessor-grouped-perl/utopic

« back to all changes in this revision

Viewing changes to inc/Module/Install.pm

  • Committer: Bazaar Package Importer
  • Author(s): Ansgar Burchardt, Ansgar Burchardt, gregor herrmann
  • Date: 2010-04-26 16:53:15 UTC
  • mfrom: (1.1.6 upstream) (5.2.1 maverick)
  • Revision ID: james.westby@ubuntu.com-20100426165315-pcbea7h1ca3c0t6g
[ Ansgar Burchardt ]
* New upstream release.
* Recommend libclass-xsaccessor-perl.
* Add build-dependency on libclass-xsaccessor-perl to use Class::XSAccessor
  during tests.
* Use source format 3.0 (quilt).
* debian/copyright: Formatting changes for current DEP-5 proposal.
* debian/copyright: Update years of copyright.

[ gregor herrmann ]
* Bump debhelper build dependency to 7.2.13 (Module::AutoInstall).

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        # This is not enforced yet, but will be some time in the next few
29
29
        # releases once we can make sure it won't clash with custom
30
30
        # Module::Install extensions.
31
 
        $VERSION = '0.91';
 
31
        $VERSION = '0.94';
32
32
 
33
33
        # Storage for the pseudo-singleton
34
34
        $MAIN    = undef;
348
348
        return $call;
349
349
}
350
350
 
351
 
sub _read {
352
 
        local *FH;
353
 
        if ( $] >= 5.006 ) {
354
 
                open( FH, '<', $_[0] ) or die "open($_[0]): $!";
355
 
        } else {
356
 
                open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
357
 
        }
358
 
        my $string = do { local $/; <FH> };
359
 
        close FH or die "close($_[0]): $!";
360
 
        return $string;
361
 
}
 
351
# Done in evals to avoid confusing Perl::MinimumVersion
 
352
eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 
353
sub _read {
 
354
        local *FH;
 
355
        open( FH, '<', $_[0] ) or die "open($_[0]): $!";
 
356
        my $string = do { local $/; <FH> };
 
357
        close FH or die "close($_[0]): $!";
 
358
        return $string;
 
359
}
 
360
END_NEW
 
361
sub _read {
 
362
        local *FH;
 
363
        open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
 
364
        my $string = do { local $/; <FH> };
 
365
        close FH or die "close($_[0]): $!";
 
366
        return $string;
 
367
}
 
368
END_OLD
362
369
 
363
370
sub _readperl {
364
371
        my $string = Module::Install::_read($_[0]);
379
386
        return $string;
380
387
}
381
388
 
382
 
sub _write {
383
 
        local *FH;
384
 
        if ( $] >= 5.006 ) {
385
 
                open( FH, '>', $_[0] ) or die "open($_[0]): $!";
386
 
        } else {
387
 
                open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
388
 
        }
389
 
        foreach ( 1 .. $#_ ) {
390
 
                print FH $_[$_] or die "print($_[0]): $!";
391
 
        }
392
 
        close FH or die "close($_[0]): $!";
393
 
}
 
389
# Done in evals to avoid confusing Perl::MinimumVersion
 
390
eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 
391
sub _write {
 
392
        local *FH;
 
393
        open( FH, '>', $_[0] ) or die "open($_[0]): $!";
 
394
        foreach ( 1 .. $#_ ) {
 
395
                print FH $_[$_] or die "print($_[0]): $!";
 
396
        }
 
397
        close FH or die "close($_[0]): $!";
 
398
}
 
399
END_NEW
 
400
sub _write {
 
401
        local *FH;
 
402
        open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
 
403
        foreach ( 1 .. $#_ ) {
 
404
                print FH $_[$_] or die "print($_[0]): $!";
 
405
        }
 
406
        close FH or die "close($_[0]): $!";
 
407
}
 
408
END_OLD
394
409
 
395
410
# _version is for processing module versions (eg, 1.03_05) not
396
411
# Perl versions (eg, 5.8.1).
427
442
 
428
443
1;
429
444
 
430
 
# Copyright 2008 - 2009 Adam Kennedy.
 
445
# Copyright 2008 - 2010 Adam Kennedy.