Changeset 31629 for lang/perl/Module-New

Show
Ignore:
Timestamp:
03/28/09 02:14:14 (6 years ago)
Author:
charsbar
Message:

Module-New: ver-req of Log::Dump -> 0.03; added missing 'no_prompt' to a test; removed a test with a deprecated option; better root guessing; 0.03 -> CPAN

Location:
lang/perl/Module-New/trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Module-New/trunk/Changes

    r31586 r31629  
    11Revision history for Module-New 
     2 
     30.03 2009/03/28 
     4  - bumped up the version req of Log::Dump to 0.03 
     5  - added missing "no_prompt" for a config test 
     6    (which must be the cause of the hang) 
     7  - removed a broken piece of a test (deprecated option) 
    28 
    390.02 2009/03/26 
  • lang/perl/Module-New/trunk/Makefile.PL

    r31586 r31629  
    1111    'File::HomeDir'         => '0.66', 
    1212    'Getopt::Long'          => 0, 
    13     'Log::Dump'             => 0, 
     13    'Log::Dump'             => '0.03', 
    1414    'Path::Extended'        => '0.10', 
    1515    'String::CamelCase'     => 0, 
  • lang/perl/Module-New/trunk/lib/Module/New.pm

    r31586 r31629  
    66use Module::New::Loader; 
    77 
    8 our $VERSION = '0.02'; 
     8our $VERSION = '0.03'; 
    99 
    1010my $CONTEXT; 
  • lang/perl/Module-New/trunk/lib/Module/New/Path.pm

    r31586 r31629  
    4545  } 
    4646 
    47   my $current = my $dir = $self->_dir('.'); 
    48   if ( $dir->subdir('lib')->exists ) { 
    49     return $self->set_root($dir); 
    50   } 
    51  
    52   while ( $dir->parent ne $dir ) { 
     47  my $try = 30; 
     48  my $dir = $self->_dir('.'); 
     49  while ( $try-- and $dir->parent ne $dir ) { 
    5350    if ( $dir->subdir('lib')->exists ) { 
    5451      if ( $dir->file('Makefile.PL')->exists 
  • lang/perl/Module-New/trunk/t/lib/Module/New/Test/Command/GuessRoot.pm

    r31586 r31629  
    2121} 
    2222 
    23 sub with_option : Test { 
    24   my $class = shift; 
    25  
    26   my $recipe = $class->load_recipe; 
    27  
    28   my $current = dir('.'); 
    29   my $testdir = dir('t'); 
    30  
    31   my $context = Module::New->setup('Module::New::ForTest'); 
    32      $context->config->set( root => $testdir ); 
    33   eval { $recipe->run; }; 
    34   ok !$@ && $context->path->_root eq $testdir, $class->message('t/ is root'); 
    35  
    36   chdir $current; 
    37 } 
    38  
    3923sub load_recipe { 
    4024  delete $INC{'Module/New/ForTest/Recipe/GuessRoot.pm'}; 
  • lang/perl/Module-New/trunk/t/lib/Module/New/Test/Config/Merge.pm

    r31586 r31629  
    99  my $class = shift; 
    1010 
    11   my $config = Module::New::Config->new; 
     11  my $config = Module::New::Config->new( no_prompt => 1 ); 
    1212 
    1313  local @ARGV = qw(--first=first --second=second); 
  • lang/perl/Module-New/trunk/t/lib/Module/New/Test/Path/GuessRoot.pm

    r31586 r31629  
    7272 
    7373  my $current = dir('.'); 
    74   my $root    = dir('/');  # I believe root doesn't have a project. 
    75  
    76   chdir $root; 
     74  my $dir; 
     75  foreach my $candidate (qw( / /tmp )) { 
     76    $dir = dir($candidate); 
     77    last if chdir $dir; 
     78  } 
     79  if ( $current eq $dir ) { 
     80    return $class->skip_this_test('this test may be unstable for you') 
     81  } 
    7782 
    7883  local $@;