Changeset 11297 for lang/perl/Acme-CPANAuthors
- Timestamp:
- 05/09/08 17:45:17 (7 months ago)
- Location:
- lang/perl/Acme-CPANAuthors/trunk
- Files:
-
- 2 modified
-
Changes (modified) (1 diff)
-
lib/Acme/CPANAuthors/Utils.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Acme-CPANAuthors/trunk/Changes
r11294 r11297 3 3 0.02 2008/05/** 4 4 - made Acme::CPANAuthors::(Specific)->authors context sensitive. 5 - better cpan config loading 5 6 6 7 0.01 2007/12/26 -
lang/perl/Acme-CPANAuthors/trunk/lib/Acme/CPANAuthors/Utils.pm
r3606 r11297 42 42 my ($dir, $basename) = @_; 43 43 44 _require_cpan_config(); 44 _require_myconfig_or_config(); 45 croak "You might want to configure CPAN first." 46 unless $CPAN::Config && ref $CPAN::Config eq 'HASH'; 45 47 46 my $source_dir = $CPAN::Config->{keep_source_where};48 my $source_dir = $CPAN::Config->{keep_source_where}; 47 49 my $file = _catfile( $source_dir, '/', $dir, '/', $basename ); 48 50 unless ( -f $file ) { … … 54 56 } 55 57 56 sub _require_cpan_config () { 57 if ( $INC{'CPAN/MyConfig.pm'} ) { 58 eval { require CPAN::MyConfig }; 59 if ( $@ and $@ !~ m{Can't locate CPAN/MyConfig\.pm} ) { 60 croak "CPAN::MyConfig error: $@"; 61 } 58 sub _require_myconfig_or_config () { # from CPAN::HandleConfig 59 return if $INC{'CPAN/MyConfig.pm'}; 60 local @INC = @INC; 61 62 eval { require File::HomeDir 0.52 }; 63 my $home = $@ ? $ENV{HOME} : File::HomeDir->my_data; 64 65 unshift @INC, File::Spec->catdir($home, '.cpan'); 66 67 eval { require CPAN::MyConfig }; 68 if ( $@ and $@ !~ m{Can't locate CPAN/MyConfig\.pm} ) { 69 croak "CPAN::MyConfig error: $@"; 62 70 } 63 71 unless ( $INC{'CPAN/MyConfig.pm'} ) {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)