about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1997-09-13 03:11:47 +0000
committerGraham Barr <gbarr@pobox.com>2009-01-24 16:58:36 -0600
commit5066e59749d48c9f52b860202b7cad7775c2844b (patch)
tree83daf86e1be13bec0d4aaaa3b31ef7853c82bfe8
parenta6c70bc9946494915d7817dcd61a661ed3009117 (diff)
downloadperl-libnet-5066e59749d48c9f52b860202b7cad7775c2844b.tar.gz
Makefile.PL
- Local config file libnet.cfg installed as Net::Config
-rw-r--r--Makefile.PL43
1 files changed, 26 insertions, 17 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 98f09d6..2be6ffa 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -47,23 +47,9 @@ sub chk_version
  $vnum >= $wanted;
 }
 
-#--- Check for Socket
-
-chk_version(Socket => '1.30') or
-    warn  "\n"
-        . "*** For Net::Cmd to work you require version 1.30, or later, of\n"
-        . "    Socket.pm from CPAN/modules/by-module/Socket/Socket-x.x.tar.gz\n\n";
-
-chk_version(IO::Socket => '1.05') or
-    warn  "\n"
-        . "*** For Net::Cmd to work you require version 1.05, or later, of\n"
-        . "    IO/Socket.pm from CPAN/modules/by-module/IO/IO-x.x.tar.gz\n\n";
-
-chk_version(Data::Dumper => '0.01') or
-    die  "\n"
-        . "*** To be able to use the libnet modules you *MUST* have\n"
-        . "    Data::Dumper installed. You can obtain this from\n"
-        . "    CPAN/modules/by-module/Data/Data-Dumper-x.x.tar.gz\n\n";
+sub MY::post_initialize
+{
+ my ($self) = @_;
 
 #--- Create Net::Config
 
@@ -82,6 +68,29 @@ foreach (keys %INC) {
 system($^X, 'Configure')
         unless -f $libnet_cfg;
 
+ $self->{PM}->{$libnet_cfg} = $self->catfile('$(INST_ARCHLIBDIR)',$config_pm);
+
+ "";
+}
+
+#--- Check for Socket
+
+chk_version(Socket => '1.30') or
+    warn  "\n"
+        . "*** For Net::Cmd to work you require version 1.30, or later, of\n"
+        . "    Socket.pm from CPAN/modules/by-module/Socket/Socket-x.x.tar.gz\n\n";
+
+chk_version(IO::Socket => '1.05') or
+    warn  "\n"
+        . "*** For Net::Cmd to work you require version 1.05, or later, of\n"
+        . "    IO/Socket.pm from CPAN/modules/by-module/IO/IO-x.x.tar.gz\n\n";
+
+chk_version(Data::Dumper => '0.01') or
+    die  "\n"
+        . "*** To be able to use the libnet modules you *MUST* have\n"
+        . "    Data::Dumper installed. You can obtain this from\n"
+        . "    CPAN/modules/by-module/Data/Data-Dumper-x.x.tar.gz\n\n";
+
 #--- Write the Makefile
 
 my @clean = qw(*% *.html *.b[ac]k *.old *.orig *.rej);