From: Doug MacEachern Date: Thu, 7 Aug 1997 00:00:00 +0000 (+0000) Subject: ExtUtils-Embed upgrade X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7e24002c4853ca0b85feacbb2d843aecc82e5441;p=p5sagit%2Fp5-mst-13.2.git ExtUtils-Embed upgrade --- diff --git a/lib/ExtUtils/Embed.pm b/lib/ExtUtils/Embed.pm index 0db3ecf..04ce176 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 {