[Reproducible-commits] [libextutils-depends-perl] 154/187: Doc, test, implement *::I::F->deps.

Maria Valentina Marin Rodrigues akira-guest at moszumanska.debian.org
Wed Jan 21 21:16:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

akira-guest pushed a commit to branch pu/reproducible_builds
in repository libextutils-depends-perl.

commit c37ee168a90c5f0b4911bcc2f685041980290582
Author: Ed J <mohawk2 at users.noreply.github.com>
Date:   Sun Aug 3 21:18:36 2014 +0100

    Doc, test, implement *::I::F->deps.
---
 lib/ExtUtils/Depends.pm | 9 +++++++++
 t/02_save_load.t        | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/ExtUtils/Depends.pm b/lib/ExtUtils/Depends.pm
index 8eed45f..00c6763 100644
--- a/lib/ExtUtils/Depends.pm
+++ b/lib/ExtUtils/Depends.pm
@@ -151,6 +151,8 @@ EOF
 		}
 	}
 
+	sub deps { \@{ \$self->{deps} }; }
+
 	sub Inline {
 		my (\$class, \$lang) = \@_;
 		if (\$lang ne 'C') {
@@ -477,6 +479,13 @@ will simply be able to write:
 And all the necessary header files, defines, and libraries will be added
 for them.
 
+The C<Mymod::Install::Files> will also implement a C<deps> method,
+which will return a list of any modules that C<Mymod> depends on -
+you will not normally need to use this:
+
+  require Mymod::Install::Files;
+  @deps = Mymod::Install::Files->deps;
+
 =head1 METHODS
 
 =over
diff --git a/t/02_save_load.t b/t/02_save_load.t
index 70935f5..a313432 100644
--- a/t/02_save_load.t
+++ b/t/02_save_load.t
@@ -106,7 +106,7 @@ is_deeply (\@DepTest::Install::Files::deps, [], 'package deps');
 is ($DepTest::Install::Files::libs, $libs, 'package libs');
 }
 
-# test Inline class method
+# test Inline class methods
 is_deeply (
   DepTest::Install::Files->Inline('C'),
   {
@@ -116,6 +116,7 @@ is_deeply (
   },
   'api check Inline method'
 );
+is_deeply ([ DepTest::Install::Files->deps ], [], 'api check deps method');
 
 # --------------------------------------------------------------------------- #
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/libextutils-depends-perl.git



More information about the Reproducible-commits mailing list