summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/Embed.pm
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@opengroup.org>1997-08-07 00:00:00 +0000
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-08-07 00:00:00 +1200
commit7e24002c4853ca0b85feacbb2d843aecc82e5441 (patch)
tree3301b2eb752e03131a950336889d9b474272e49b /lib/ExtUtils/Embed.pm
parent674e5b034598ee63bb833a1d4379a19bd9fddac5 (diff)
downloadperl-7e24002c4853ca0b85feacbb2d843aecc82e5441.tar.gz
ExtUtils-Embed upgrade
Diffstat (limited to 'lib/ExtUtils/Embed.pm')
-rw-r--r--lib/ExtUtils/Embed.pm29
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm
index 0db3ecfcc4..04ce1763da 100644
--- a/lib/ExtUtils/Embed.pm
+++ b/lib/ExtUtils/Embed.pm
@@ -17,11 +17,7 @@ use vars qw(@ISA @EXPORT $VERSION
);
use strict;
-$VERSION = sprintf("%d.%02d", q$Revision: 1.2501 $ =~ /(\d+)\.(\d+)/);
-#for the namespace change
-$Devel::embed::VERSION = "99.99";
-
-sub Version { $VERSION; }
+$VERSION = sprintf("%d.%02d", q$Revision: 1.2505 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(&xsinit &ldopts
@@ -35,6 +31,18 @@ sub Version { $VERSION; }
$Verbose = 0;
$lib_ext = $Config{lib_ext} || '.a';
+sub is_cmd { $0 eq '-e' }
+
+sub my_return {
+ my $val = shift;
+ if(is_cmd) {
+ print $val;
+ }
+ else {
+ return $val;
+ }
+}
+
sub xsinit {
my($file, $std, $mods) = @_;
my($fh,@mods,%seen);
@@ -213,24 +221,23 @@ sub ldopts {
print STDERR "ldopts: '$linkage'\n" if $Verbose;
return $linkage if scalar @_;
- print "$linkage\n";
+ my_return("$linkage\n");
}
sub ccflags {
- print " $Config{ccflags} ";
+ my_return(" $Config{ccflags} ");
}
sub ccdlflags {
- print " $Config{ccdlflags} ";
+ my_return(" $Config{ccdlflags} ");
}
sub perl_inc {
- print " -I$Config{archlibexp}/CORE ";
+ my_return(" -I$Config{archlibexp}/CORE ");
}
sub ccopts {
- ccflags;
- perl_inc;
+ ccflags . perl_inc;
}
sub canon {