r50190 - in /branches/upstream/libmodule-depends-perl: ./ current/ current/lib/ current/lib/Module/ current/lib/Module/Depends/ current/t/ current/t/build_version/ current/t/empty/ current/t/inline-makemaker/ current/t/mmish/ current/t/module-install/ current/t/old/ current/t/template-extract/ current/t/uses-findbin/ current/t/with-yaml/

ryan at users.alioth.debian.org ryan at users.alioth.debian.org
Tue Jan 5 00:58:39 UTC 2010


Author: ryan
Date: Tue Jan  5 00:57:37 2010
New Revision: 50190

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=50190
Log:
[svn-inject] Installing original source of libmodule-depends-perl

Added:
    branches/upstream/libmodule-depends-perl/
    branches/upstream/libmodule-depends-perl/current/
    branches/upstream/libmodule-depends-perl/current/Build.PL
    branches/upstream/libmodule-depends-perl/current/Changes
    branches/upstream/libmodule-depends-perl/current/MANIFEST
    branches/upstream/libmodule-depends-perl/current/MANIFEST.SKIP
    branches/upstream/libmodule-depends-perl/current/META.yml
    branches/upstream/libmodule-depends-perl/current/Makefile.PL
    branches/upstream/libmodule-depends-perl/current/NINJA
    branches/upstream/libmodule-depends-perl/current/README
    branches/upstream/libmodule-depends-perl/current/lib/
    branches/upstream/libmodule-depends-perl/current/lib/Module/
    branches/upstream/libmodule-depends-perl/current/lib/Module/Depends/
    branches/upstream/libmodule-depends-perl/current/lib/Module/Depends.pm
    branches/upstream/libmodule-depends-perl/current/lib/Module/Depends/Intrusive.pm
    branches/upstream/libmodule-depends-perl/current/t/
    branches/upstream/libmodule-depends-perl/current/t/build_version/
    branches/upstream/libmodule-depends-perl/current/t/build_version/Build.PL
    branches/upstream/libmodule-depends-perl/current/t/depends.t
    branches/upstream/libmodule-depends-perl/current/t/empty/
    branches/upstream/libmodule-depends-perl/current/t/empty/.exists
    branches/upstream/libmodule-depends-perl/current/t/inline-makemaker/
    branches/upstream/libmodule-depends-perl/current/t/inline-makemaker/Makefile.PL
    branches/upstream/libmodule-depends-perl/current/t/mmish/
    branches/upstream/libmodule-depends-perl/current/t/mmish/Makefile.PL
    branches/upstream/libmodule-depends-perl/current/t/module-install/
    branches/upstream/libmodule-depends-perl/current/t/module-install/Makefile.PL
    branches/upstream/libmodule-depends-perl/current/t/old/
    branches/upstream/libmodule-depends-perl/current/t/old/Build.PL
    branches/upstream/libmodule-depends-perl/current/t/old/META.yml
    branches/upstream/libmodule-depends-perl/current/t/old/Makefile.PL
    branches/upstream/libmodule-depends-perl/current/t/template-extract/
    branches/upstream/libmodule-depends-perl/current/t/template-extract/Build.PL
    branches/upstream/libmodule-depends-perl/current/t/template-extract/META.yml
    branches/upstream/libmodule-depends-perl/current/t/template-extract/Makefile.PL
    branches/upstream/libmodule-depends-perl/current/t/uses-findbin/
    branches/upstream/libmodule-depends-perl/current/t/uses-findbin/Makefile.PL   (with props)
    branches/upstream/libmodule-depends-perl/current/t/with-yaml/
    branches/upstream/libmodule-depends-perl/current/t/with-yaml/META.yml

Added: branches/upstream/libmodule-depends-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/Build.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/Build.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/Build.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,17 @@
+use strict;
+use Module::Build;
+
+Module::Build->new(
+    module_name => "Module::Depends",
+    license     => 'perl',
+    build_requires => {
+        'Test::More' => 0,
+    },
+    requires => {
+        'YAML' => 0,
+        'File::Spec'  => 0,
+        'Class::Accessor::Chained' => 0,
+    },
+    create_makefile_pl => 'traditional',
+   )
+  ->create_build_script;

Added: branches/upstream/libmodule-depends-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/Changes?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/Changes (added)
+++ branches/upstream/libmodule-depends-perl/current/Changes Tue Jan  5 00:57:37 2010
@@ -1,0 +1,54 @@
+0.14 Wednesday 13th February, 2008
+	Set $0 to be $file, this allows the use of FindBin in your
+	Makefile.PL (if you're so inclined)
+
+0.13 Tuesday 26th June, 2007
+	File::chdir 0.08 changed its behaviour and is not backwards
+	compatible - avoid using it.
+
+0.12 Thursday 1st March, 2007
+	Implement a y_n for the Module::Build fakery
+
+0.11 Saturday 3rd February, 2007
+	Fixed the emulation of Module::Install::require
+	Change the base test case so that it doesn't need a 
+        ./Build dist first (for when building out of SVN rather 
+       than a released dist)
+
+0.10 Thursday 2nd June, 2005
+	Ship the file for the test suite.  Doh.
+
+0.09 Thursday 2nd June, 2005
+	Dummy out that pesky inc::Module::Install
+
+0.08 Thursday 21st April, 2005
+	Make use of Cwd::realpath to normalise paths with relative 
+	components in them. (Tom Insam)
+
+0.07 Friday 18th February, 2005
+	Fixed the relative, non-intrusive case (I forgot we went to
+	chdiring all over the shop)
+
+0.06 Tuesday 14th September, 2004
+	Rewrote source code example in synopsis so it works
+
+0.05 Thursday 17th June, 2004
+	Dummy out Inline::MakeMaker too
+
+0.04 Wednesday 19th May, 2004
+	Supply a dummy $VERSION for our fake Module::Build
+
+0.03 Friday 23rd January, 2004
+	The "Oh damnit, MakeMaker.pm was subtly different to
+	ModuleBuild.pm" release.  Changes from gutting Fotango::Build.
+
+	Modified the fakeout of Module::Build
+	On failure methods now set ->error rather than croaking
+
+0.02 Friday 23rd January, 2004
+	NINJA compliance
+	<environment barbie> Chdir is hard!  Uses File::chdir to
+	dynamically change back to where we started </>
+
+0.01 Thursday 22nd January, 2004
+	Initial CPAN release

Added: branches/upstream/libmodule-depends-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/MANIFEST?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/MANIFEST (added)
+++ branches/upstream/libmodule-depends-perl/current/MANIFEST Tue Jan  5 00:57:37 2010
@@ -1,0 +1,24 @@
+Changes
+Build.PL
+lib/Module/Depends.pm
+lib/Module/Depends/Intrusive.pm
+Makefile.PL
+README
+MANIFEST
+MANIFEST.SKIP
+META.yml
+NINJA
+t/depends.t
+t/old/Build.PL
+t/old/META.yml
+t/old/Makefile.PL
+t/mmish/Makefile.PL
+t/empty/.exists
+t/build_version/Build.PL
+t/inline-makemaker/Makefile.PL
+t/with-yaml/META.yml
+t/module-install/Makefile.PL
+t/template-extract/Build.PL
+t/template-extract/META.yml
+t/template-extract/Makefile.PL
+t/uses-findbin/Makefile.PL

Added: branches/upstream/libmodule-depends-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/MANIFEST.SKIP?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/MANIFEST.SKIP (added)
+++ branches/upstream/libmodule-depends-perl/current/MANIFEST.SKIP Tue Jan  5 00:57:37 2010
@@ -1,0 +1,9 @@
+.cvsignore
+\.svn
+blib/
+\bCVS\b
+^Makefile$
+pm_to_blib
+_build
+^Build$
+~$

Added: branches/upstream/libmodule-depends-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/META.yml?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/META.yml (added)
+++ branches/upstream/libmodule-depends-perl/current/META.yml Tue Jan  5 00:57:37 2010
@@ -1,0 +1,14 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
+name:         Module-Depends
+version:      0.14
+version_from: lib/Module/Depends.pm
+installdirs:  site
+requires:
+    Class::Accessor::Chained:      0
+    File::Spec:                    0
+    Test::More:                    0
+    YAML:                          0
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.17

Added: branches/upstream/libmodule-depends-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/Makefile.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/Makefile.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/Makefile.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,17 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+          'PL_FILES' => {},
+          'INSTALLDIRS' => 'site',
+          'NAME' => 'Module::Depends',
+          'EXE_FILES' => [],
+          'VERSION_FROM' => 'lib/Module/Depends.pm',
+          'PREREQ_PM' => {
+                           'Test::More' => 0,
+                           'YAML' => 0,
+                           'Class::Accessor::Chained' => 0,
+                           'File::Spec' => 0
+                         }
+        )
+;

Added: branches/upstream/libmodule-depends-perl/current/NINJA
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/NINJA?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/NINJA (added)
+++ branches/upstream/libmodule-depends-perl/current/NINJA Tue Jan  5 00:57:37 2010
@@ -1,0 +1,8 @@
+--- #YAML:1.0
+attributes:
+  charisma: 0.33
+  constitution: 1.00
+  dexterity: 0.33
+  intelligence: 0.13
+  strength: 0.33
+  wisdom: 0.20

Added: branches/upstream/libmodule-depends-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/README?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/README (added)
+++ branches/upstream/libmodule-depends-perl/current/README Tue Jan  5 00:57:37 2010
@@ -1,0 +1,73 @@
+README for Module::Depends 0.13
+
+=head1 NAME
+
+Module::Depends - identify the dependencies of a distribution
+
+=head1 SYNOPSIS
+
+ use YAML;
+ use Module::Depends;
+ my $deps = Module::Depends->new->dist_dir( '.' )->find_modules;
+ print "Our dependencies:\n", Dump $deps->requires;
+
+
+=head1 DEPENDENCIES
+
+This module has external dependencies on the following modules:
+
+ Class::Accessor::Chained
+ File::Spec
+ YAML
+
+=head1 INSTALLATION
+
+ perl Build.PL
+ perl Build test
+
+and if all goes well
+
+ perl Build install
+
+=head1 HISTORY
+
+What changed over the last 3 revisions
+
+=over
+
+=item 0.13 Tuesday 26th June, 2007
+
+    File::chdir 0.08 changed its behaviour and is not backwards
+    compatible - avoid using it.
+
+
+=item 0.12 Thursday 1st March, 2007
+
+	Implement a y_n for the Module::Build fakery
+
+
+=item 0.11 Saturday 3rd February, 2007
+
+	Fixed the emulation of Module::Install::require
+	Change the base test case so that it doesn't need a 
+        ./Build dist first (for when building out of SVN rather 
+       than a released dist)
+
+=back
+
+=head1 AUTHOR
+
+Richard Clamp, based on code extracted from the Fotango build system
+originally by James Duncan and Arthur Bergman.
+
+=head1 COPYRIGHT
+
+Copyright 2004,2007 Fotango.  All Rights Reserved.
+
+This module is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+L<Module::Depends::Intrusive>
+

Added: branches/upstream/libmodule-depends-perl/current/lib/Module/Depends.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/lib/Module/Depends.pm?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/lib/Module/Depends.pm (added)
+++ branches/upstream/libmodule-depends-perl/current/lib/Module/Depends.pm Tue Jan  5 00:57:37 2010
@@ -1,0 +1,127 @@
+use strict;
+package Module::Depends;
+use YAML qw( LoadFile );
+use Cwd qw( getcwd );
+use base qw( Class::Accessor::Chained );
+__PACKAGE__->mk_accessors(qw( dist_dir debug libs requires build_requires error ));
+our $VERSION = '0.14';
+
+=head1 NAME
+
+Module::Depends - identify the dependencies of a distribution
+
+=head1 SYNOPSIS
+
+ use YAML;
+ use Module::Depends;
+ my $deps = Module::Depends->new->dist_dir( '.' )->find_modules;
+ print "Our dependencies:\n", Dump $deps->requires;
+
+=head1 DESCRIPTION
+
+Module::Depends extracts module dependencies from an unpacked
+distribution tree.
+
+Module::Depends only evaluates the META.yml shipped with a
+distribution.  This won't be effective until all distributions ship
+META.yml files, so we suggest you take your life in your hands and
+look at Module::Depends::Intrusive.
+
+=head1 METHODS
+
+=head2 new
+
+simple constructor
+
+=cut
+
+sub new {
+    my $self = shift;
+
+    return $self->SUPER::new({
+        libs           => [],
+        requires       => {},
+        build_requires => {},
+        error          => '',
+    });
+}
+
+=head2 dist_dir
+
+Path where the distribution has been extracted to.
+
+=head2 find_modules
+
+scan the C<dist_dir> to populate C<libs>, C<requires>, and C<build_requires>
+
+=cut
+
+sub find_modules {
+    my $self = shift;
+
+    my $here = getcwd;
+    unless (chdir $self->dist_dir) {
+        $self->error( "couldn't chdir to " . $self->dist_dir . ": $!" );
+        return $self; 
+    }
+    eval { $self->_find_modules };
+    chdir $here;
+    die $@ if $@;
+    
+    return $self;
+}
+
+sub _find_modules {
+    my $self = shift;
+
+    my $file = 'META.yml';
+    if (-e $file) {
+        my $meta = LoadFile( $file );
+        $self->requires( $meta->{requires} );
+        $self->build_requires( $meta->{build_requires} );
+    }
+    else {
+        $self->error( "No META.yml found in ". $self->dist_dir );
+    }
+    return $self;
+}
+
+
+1;
+__END__
+
+=head2 libs
+
+an array reference of lib lines
+
+=head2 requires
+
+A reference to a hash enumerating the prerequisite modules for this
+distribution.
+
+=head2 build_requires
+
+A reference to a hash enumerating the modules needed to build the
+distribution.
+
+=head2 error
+
+A reason, if any, for failing to get dependencies.
+
+=head1 AUTHOR
+
+Richard Clamp, based on code extracted from the Fotango build system
+originally by James Duncan and Arthur Bergman.
+
+=head1 COPYRIGHT
+
+Copyright 2004, 2007, 2008 Fotango.  All Rights Reserved.
+
+This module is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+L<Module::Depends::Intrusive>
+
+=cut

Added: branches/upstream/libmodule-depends-perl/current/lib/Module/Depends/Intrusive.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/lib/Module/Depends/Intrusive.pm?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/lib/Module/Depends/Intrusive.pm (added)
+++ branches/upstream/libmodule-depends-perl/current/lib/Module/Depends/Intrusive.pm Tue Jan  5 00:57:37 2010
@@ -1,0 +1,140 @@
+use strict;
+package Module::Depends::Intrusive;
+use base qw( Module::Depends );
+use Cwd qw( getcwd );
+use ExtUtils::MakeMaker ();
+
+sub _find_modules {
+    my $self = shift;
+
+    # this order is important, as when a Makefile.PL and Build.PL are
+    # present, the Makefile.PL could just be a passthrough
+    my $pl = -e 'Build.PL' ? 'Build.PL' : -e 'Makefile.PL' ? 'Makefile.PL' : 0;
+    unless ($pl) {
+        $self->error( 'No {Build,Makefile}.PL found in '.$self->dist_dir );
+        return $self;
+    }
+
+    # fake up Module::Build and ExtUtils::MakeMaker
+    no warnings 'redefine';
+    local *STDIN; # run non-interactive
+    local *ExtUtils::Liblist::ext = sub {
+        my ($class, $lib) = @_;
+        $lib =~ s/\-l//;
+        push @{ $self->libs }, $lib;
+        return 1;
+    };
+    local *CORE::GLOBAL::exit = sub { };
+    local $INC{"Module/Build.pm"} = 1;
+    local @MyModuleBuilder::ISA = qw( Module::Build );
+    local *Module::Build::new = sub {
+        my $class = shift;
+        my %args =  @_;
+        $self->requires( $args{requires} || {} );
+        $self->build_requires( $args{build_requires} || {} );
+        bless {}, "Module::Depends::Intrusive::Fake::Module::Build";
+    };
+    local *Module::Build::subclass = sub { 'Module::Build' };
+    local $Module::Build::VERSION = 666;
+
+    my $WriteMakefile = sub {
+        my %args = @_;
+        $self->requires( $args{PREREQ_PM} || {} );
+        1;
+    };
+    local *main::WriteMakefile;
+    local *ExtUtils::MakeMaker::WriteMakefile = $WriteMakefile;
+
+    # Inline::MakeMaker
+    local $INC{"Inline/MakeMaker.pm"} = 1;
+
+    local @Inline::MakeMaker::EXPORT = qw( WriteMakefile WriteInlineMakefile );
+    local @Inline::MakeMaker::ISA = qw( Exporter );
+    local *Inline::MakeMaker::WriteMakefile = $WriteMakefile;
+    local *Inline::MakeMaker::WriteInlineMakefile = $WriteMakefile;
+
+    # Module::Install
+    local $INC{"inc/Module/Install.pm"} = 1;
+    local @inc::Module::Install::ISA = qw( Exporter );
+    local @inc::Module::Install::EXPORT = qw(
+
+      all_from auto_install AUTOLOAD build_requires check_nmake include
+      include_deps installdirs Makefile makemaker_args Meta name no_index
+      requires WriteAll clean_files can_cc sign cc_inc_paths cc_files
+      cc_optimize_flags author license
+
+    );
+    local *inc::Module::Install::AUTOLOAD = sub { 1 };
+    local *inc::Module::Install::requires = sub {
+        my %deps = (@_ == 1 ? ( $_[0] => 0 ) : @_);
+        $self->requires->{ $_ } = $deps{ $_ } for keys %deps;
+    };
+    local *inc::Module::Install::include_deps = *inc::Module::Install::requires;
+    local *inc::Module::Install::build_requires = sub {
+        my %deps = (@_ == 1 ? ( $_[0] => 0 ) : @_);
+        $self->build_requires->{ $_ } = $deps{ $_ } for keys %deps;
+    };
+
+    my $file = File::Spec->catfile( getcwd(), $pl );
+    eval {
+        package main;
+        no strict;
+        no warnings;
+	local $0 = $file;
+        require "$file";
+    };
+    $self->error( $@ ) if $@;
+    delete $INC{$file};
+    return $self;
+}
+
+package Module::Depends::Intrusive::Fake::Module::Build;
+sub DESTROY {}
+sub AUTOLOAD { shift }
+sub y_n {
+    my ($self, $question, $default) = @_;
+    $default ||= 'n';
+    return 1 if lc $default eq 'y';
+    return 0; # ok, we may say no when yes was intended, but we can't hang
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Module::Depends::Intrusive - intrusive discovery of distribution dependencies.
+
+=head1 SYNOPSIS
+
+ # Just like Module::Depends, only use the Intrusive class instead
+
+=head1 DESCRIPTION
+
+This module devines dependencies by running the distributions
+Makefile.PL/Build.PL in a faked up environment and intercepting the
+calls to Module::Build->new and ExtUtils::MakeMaker::WriteMakefile.
+
+You may now freak out about security.
+
+While you're doing that please remember that what we're doing is much
+the same that CPAN.pm does in order to discover prerequisites.
+
+=head1 AUTHOR
+
+Richard Clamp, based on code extracted from the Fotango build system
+originally by James Duncan and Arthur Bergman.
+
+=head1 COPYRIGHT
+
+Copyright 2004 Fotango.  All Rights Reserved.
+
+This module is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+L<Module::Depends>
+
+=cut

Added: branches/upstream/libmodule-depends-perl/current/t/build_version/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/build_version/Build.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/build_version/Build.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/build_version/Build.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,11 @@
+use Module::Build 0.18;
+my $build = Module::Build->new(
+    module_name   => 'Term::ProgressBar',
+    dist_version  => '2.06',
+    license       => 'perl',
+    requires      => {
+        Class::MethodMaker => '1.02',
+        Term::ReadKey      => '2.14',
+    },
+);
+$build->create_build_script

Added: branches/upstream/libmodule-depends-perl/current/t/depends.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/depends.t?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/depends.t (added)
+++ branches/upstream/libmodule-depends-perl/current/t/depends.t Tue Jan  5 00:57:37 2010
@@ -1,0 +1,109 @@
+#!perl
+use strict;
+use warnings;
+use Test::More tests => 18;
+my $class = 'Module::Depends::Intrusive';
+require_ok("Module::Depends");
+require_ok($class);
+
+my $our_requires = {
+    'Class::Accessor::Chained' => 0,
+    'File::chdir'              => 0,
+    'File::Spec'               => 0,
+    'YAML'                     => 0,
+};
+
+# test against ourself
+my $mb = $class->new->dist_dir('t/old')->find_modules;
+is( $mb->error, '' );
+isa_ok( $mb, $class );
+
+is_deeply( $mb->requires, $our_requires, "got our own requires" );
+
+is_deeply(
+    $mb->build_requires,
+    { 'Test::More' => 0 },
+    "got our own build_requires"
+);
+
+my $other = $class->new->dist_dir("t/mmish")->find_modules;
+
+is_deeply(
+    $other->requires,
+    { 'Not::A::Real::Module' => 42 },
+    "got other (makemaker) requires"
+);
+
+my $notthere = $class->new->dist_dir('t/no-such-dir')->find_modules;
+like(
+    $notthere->error,
+    qr{^couldn't chdir to t/no-such-dir: },
+    "fails on not existing dir"
+);
+
+$notthere->dist_dir('t/empty')->find_modules;
+like(
+    $notthere->error,
+    qr{^No {Build,Makefile}.PL found },
+    "fails on empty dir"
+);
+
+my $versioned = $class->new->dist_dir('t/build_version')->find_modules;
+is_deeply(
+    $versioned->requires,
+    {   'Class::MethodMaker' => '1.02',
+        'Term::ReadKey'      => '2.14'
+    },
+    "use Module::Build VERSION; no longer trips us up"
+);
+
+### gah, it seems File::chdir's localisation doesn't nest, otherwise we could use that here
+chdir 't/old';
+my $shy = Module::Depends->new->dist_dir('.')->find_modules;
+chdir '../..';
+is_deeply( $shy->requires, $our_requires,
+    "got our own requires, non-intrusively" );
+
+my $distant = Module::Depends->new->dist_dir('t/with-yaml')->find_modules;
+is_deeply( $distant->requires, $our_requires,
+    "got our own requires, non-intrusively, from a distance" );
+
+my $inline_mm = $class->new->dist_dir('t/inline-makemaker')->find_modules;
+is_deeply(
+    $inline_mm->requires,
+    {   'Inline::C'   => '0.44',
+        'Time::Piece' => '1.08'
+    },
+    "use Inline::MakeMaker; no longer trips us up"
+);
+
+my $module_install = $class->new->dist_dir('t/module-install')->find_modules;
+is( $module_install->error, '', "Module::Install no go boom" );
+is_deeply(
+    $module_install->build_requires,
+    { 'Test::More' => '0.54' },
+    "Module::Install build_requires"
+);
+
+is_deeply(
+    $module_install->requires,
+    { 'perl' => '5.5.3' },
+    "Module::Install requires"
+);
+
+my $template_extract
+    = $class->new->dist_dir('t/template-extract')->find_modules;
+is_deeply(
+    $template_extract->requires,
+    {   'perl'     => '5.006',
+        'Template' => 2
+    },
+    "Template::Extract Module::Install requires"
+);
+
+my $findbin = $class->new->dist_dir('t/uses-findbin')->find_modules;
+is_deeply(
+    $findbin->requires,
+    { 'Not::A::Real::Module' => 42 },
+    "odd outcome use of FindBin"
+);

Added: branches/upstream/libmodule-depends-perl/current/t/empty/.exists
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/empty/.exists?rev=50190&op=file
==============================================================================
    (empty)

Added: branches/upstream/libmodule-depends-perl/current/t/inline-makemaker/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/inline-makemaker/Makefile.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/inline-makemaker/Makefile.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/inline-makemaker/Makefile.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,12 @@
+use Inline::MakeMaker;
+
+WriteInlineMakefile(
+  'NAME'            => 'FFmpeg',
+  'VERSION_FROM'    => 'FFmpeg.pm', # finds $VERSION
+  'PREREQ_PM'       => {
+      Inline::C     => 0.44,
+      Time::Piece   => 1.08,
+      #                         Image::PBMlib => 1.06,
+      #                         Image::Magick => 5.56,
+  },
+ );

Added: branches/upstream/libmodule-depends-perl/current/t/mmish/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/mmish/Makefile.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/mmish/Makefile.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/mmish/Makefile.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,7 @@
+#!perl -w
+use ExtUtils::MakeMaker;
+WriteMakefile(
+    PREREQ_PM      => {
+        'Not::A::Real::Module' => 42,
+    },
+   );

Added: branches/upstream/libmodule-depends-perl/current/t/module-install/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/module-install/Makefile.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/module-install/Makefile.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/module-install/Makefile.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,20 @@
+use inc::Module::Install;
+
+name('YAML');
+author('Brian Ingerson <ingy at cpan.org>');
+abstract("YAML Ain't Markup Language");
+license('perl');
+version_from('lib/YAML.pm');
+
+requires(qw(
+    perl 5.5.3
+));
+build_requires(qw(
+    Test::More 0.54
+));
+
+install_script('ysh');
+
+check_nmake();
+
+&WriteAll();

Added: branches/upstream/libmodule-depends-perl/current/t/old/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/old/Build.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/old/Build.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/old/Build.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,18 @@
+use strict;
+use Module::Build;
+
+Module::Build->new(
+    module_name => "Module::Depends",
+    license     => 'perl',
+    build_requires => {
+        'Test::More' => 0,
+    },
+    requires => {
+        'YAML' => 0,
+        'File::chdir' => 0,
+        'File::Spec'  => 0,
+        'Class::Accessor::Chained' => 0,
+    },
+    create_makefile_pl => 'traditional',
+   )
+  ->create_build_script;

Added: branches/upstream/libmodule-depends-perl/current/t/old/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/old/META.yml?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/old/META.yml (added)
+++ branches/upstream/libmodule-depends-perl/current/t/old/META.yml Tue Jan  5 00:57:37 2010
@@ -1,0 +1,24 @@
+---
+name: Module-Depends
+version: 0.10
+author: ~
+abstract: identify the dependencies of a distribution
+license: perl
+requires:
+  Class::Accessor::Chained: 0
+  File::Spec: 0
+  File::chdir: 0
+  YAML: 0
+build_requires:
+  Test::More: 0
+provides:
+  Module::Depends:
+    file: lib/Module/Depends.pm
+    version: 0.10
+  Module::Depends::Intrusive:
+    file: lib/Module/Depends/Intrusive.pm
+  Module::Depends::Intrusive::Fake::Module::Build:
+    file: lib/Module/Depends/Intrusive.pm
+  main:
+    file: lib/Module/Depends/Intrusive.pm
+generated_by: Module::Build version 0.261

Added: branches/upstream/libmodule-depends-perl/current/t/old/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/old/Makefile.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/old/Makefile.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/old/Makefile.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,17 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+          'PL_FILES' => {},
+          'INSTALLDIRS' => 'site',
+          'NAME' => 'Module::Depends',
+          'VERSION_FROM' => 'lib/Module/Depends.pm',
+          'PREREQ_PM' => {
+                           'Test::More' => 0,
+                           'YAML' => 0,
+                           'Class::Accessor::Chained' => 0,
+                           'File::Spec' => 0,
+                           'File::chdir' => 0
+                         }
+        )
+;

Added: branches/upstream/libmodule-depends-perl/current/t/template-extract/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/template-extract/Build.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/template-extract/Build.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/template-extract/Build.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,2 @@
+#!/usr/bin/env perl
+do 'Makefile.PL';

Added: branches/upstream/libmodule-depends-perl/current/t/template-extract/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/template-extract/META.yml?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/template-extract/META.yml (added)
+++ branches/upstream/libmodule-depends-perl/current/t/template-extract/META.yml Tue Jan  5 00:57:37 2010
@@ -1,0 +1,15 @@
+name: Template-Extract
+version: 0.38
+abstract: Use TT2 syntax to extract data from documents
+author: Autrijus Tang <autrijus at autrijus.org>
+license: perl
+distribution_type: module
+build_requires:
+  Test::More: 0
+requires:
+  perl: 5.6.0
+  Template: 2
+no_index:
+  directory:
+    - inc
+generated_by: Module::Install version 0.35

Added: branches/upstream/libmodule-depends-perl/current/t/template-extract/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/template-extract/Makefile.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/template-extract/Makefile.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/template-extract/Makefile.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,18 @@
+#!/usr/bin/env perl
+use 5.006;
+use inc::Module::Install;
+
+author		('Autrijus Tang <autrijus at autrijus.org>');
+name		('Template-Extract');
+abstract	('Use TT2 syntax to extract data from documents');
+version_from	('lib/Template/Extract.pm');
+license		('perl');
+
+requires	(
+    perl	=> 5.006,
+    Template	=> 2.00,
+);
+build_requires	('Test::More');
+
+auto_include_deps();
+WriteAll( sign => 1 );

Added: branches/upstream/libmodule-depends-perl/current/t/uses-findbin/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/uses-findbin/Makefile.PL?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/uses-findbin/Makefile.PL (added)
+++ branches/upstream/libmodule-depends-perl/current/t/uses-findbin/Makefile.PL Tue Jan  5 00:57:37 2010
@@ -1,0 +1,8 @@
+#!perl -w
+use ExtUtils::MakeMaker;
+use FindBin qw($Bin);
+WriteMakefile(
+    PREREQ_PM      => {
+        'Not::A::Real::Module' => 42,
+    },
+   );

Propchange: branches/upstream/libmodule-depends-perl/current/t/uses-findbin/Makefile.PL
------------------------------------------------------------------------------
    svn:executable = 

Added: branches/upstream/libmodule-depends-perl/current/t/with-yaml/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-depends-perl/current/t/with-yaml/META.yml?rev=50190&op=file
==============================================================================
--- branches/upstream/libmodule-depends-perl/current/t/with-yaml/META.yml (added)
+++ branches/upstream/libmodule-depends-perl/current/t/with-yaml/META.yml Tue Jan  5 00:57:37 2010
@@ -1,0 +1,24 @@
+---
+name: Module-Depends
+version: 0.06
+author: ~
+abstract: identify the dependencies of a distribution
+license: perl
+requires:
+  Class::Accessor::Chained: 0
+  File::Spec: 0
+  File::chdir: 0
+  YAML: 0
+build_requires:
+  Test::More: 0
+provides:
+  Module::Depends:
+    file: lib/Module/Depends.pm
+    version: 0.06
+  Module::Depends::Intrusive:
+    file: lib/Module/Depends/Intrusive.pm
+  Module::Depends::Intrusive::Fake::Module::Build:
+    file: lib/Module/Depends/Intrusive.pm
+  main:
+    file: lib/Module/Depends/Intrusive.pm
+generated_by: Module::Build version 0.2608




More information about the Pkg-perl-cvs-commits mailing list