[perl-ExtUtils-Depends] Doc, test, implement *::I::F->deps.
- From: Ed J <edj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-ExtUtils-Depends] Doc, test, implement *::I::F->deps.
- Date: Mon, 4 Aug 2014 13:32:35 +0000 (UTC)
commit c37ee168a90c5f0b4911bcc2f685041980290582
Author: Ed J <mohawk2 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 deletions(-)
---
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');
# --------------------------------------------------------------------------- #
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]