perl

 view release on metacpan or  search on metacpan

Configure  view on Meta::CPAN

archname=''
myarchname=''
useversionedarchname=''
d_atolf=''
d_atoll=''
baserev=''
bin=''
binexp=''
initialinstalllocation=''
installbin=''
userelocatableinc=''
byteorder=''
cc=''
ccflags=''
cppflags=''
ldflags=''
lkflags=''
locincpth=''
optimize=''
cf_email=''
cf_by=''

Configure  view on Meta::CPAN

. ./getfile
if $test "X$ansexp" != "X$binexp"; then
	installbin=''
fi
prefixvar=bin
: XXX Bug? -- ignores Configure -Dinstallprefix setting.
: XXX If this is fixed, also fix the "start perl" hunk below, which relies on
:     this via initialinstalllocation
. ./setprefixvar

case "$userelocatableinc" in
$define|true|[yY]*)	dflt='y' ;;
*)			dflt='n' ;;
esac
cat <<EOM

Would you like to build Perl so that the installation is relocatable, so that
library paths in @INC are determined relative to the path of the perl binary?
This is not advised for system Perl installs, or if you need to run setid
scripts or scripts under taint mode.

If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
rp='Use relocatable @INC?'
. ./myread
case "$ans" in
y|Y)	val="$define" ;;
*)	val="$undef"  ;;
esac
set userelocatableinc
eval $setvar

initialinstalllocation="$binexp"
: Default prefix is now "up one level from where the binaries are"
case "$userelocatableinc" in
$define|true|[yY]*)
    bin=".../"
    binexp=".../"
    prefix=".../.."
    prefixexp=".../.."
    installprefixexp=".../.."
    ;;
esac

: determine where private library files go

Configure  view on Meta::CPAN

	case "$ans" in
	true|$define|[Yy]*)
		useshrplib='true'  ;;
	*)	useshrplib='false' ;;
	esac
	;;
esac

case "$useshrplib" in
true)
	case "$userelocatableinc" in
	true|define)
		echo "Cannot build with both -Duserelocatableinc and -Duseshrplib" >&4
		echo "See INSTALL for an explanation why that won't work." >&4
		exit 4
		;;
	esac
	case "$libperl" in
	'')
		# Figure out a good name for libperl.so.  Since it gets stored in
		# a version-specific architecture-dependent library, the version
		# number isn't really that important, except for making cc/ld happy.
		#

Configure  view on Meta::CPAN


case "$versiononly" in
"$define") inc_version_list=''
           inc_version_list_init=0
           ;;
esac

: figure out how to guarantee perl startup
: XXX Note that this currently takes advantage of the bug that binexp ignores
:     the Configure -Dinstallprefix setting, which in turn means that under
:     relocatable @INC, initialinstalllocation is what binexp started as.
case "$startperl" in
'')
	case "$sharpbang" in
	*!)
		$cat <<EOH

I can use the #! construct to start perl on your system. This will
make startup of perl scripts faster, but may cause problems if you
want to share those scripts and perl is not in a standard place
($initialinstalllocation/perl) on all your platforms. The alternative

Configure  view on Meta::CPAN

usemorebits='$usemorebits'
usemultiplicity='$usemultiplicity'
usemymalloc='$usemymalloc'
usenm='$usenm'
usensgetexecutablepath='$usensgetexecutablepath'
useopcode='$useopcode'
useperlio='$useperlio'
useposix='$useposix'
usequadmath='$usequadmath'
usereentrant='$usereentrant'
userelocatableinc='$userelocatableinc'
useshrplib='$useshrplib'
usesitecustomize='$usesitecustomize'
usesocks='$usesocks'
usethreads='$usethreads'
usevendorprefix='$usevendorprefix'
useversionedarchname='$useversionedarchname'
usevfork='$usevfork'
usrinc='$usrinc'
uuname='$uuname'
uvXUformat='$uvXUformat'

Cross/Makefile-cross-SH  view on Meta::CPAN

CCDLFLAGS = $ccdlflags
DLSUFFIX = .$dlext
PLDLFLAGS = $pldlflags
LIBPERL = $libperl
LLIBPERL= $linklibperl
SHRPENV = $shrpenv

# Static targets are ordinarily built without CCCDLFLAGS.  However,
# if building a shared libperl.so that might later be linked into
# another application, then it might be appropriate to also build static
# extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC
# for GNU cc).
STATIC_LDFLAGS = $static_ldflags

# The following is used to include the current directory in
# the dynamic loader path you are building a shared libperl.
LDLIBPTH = $ldlibpth

dynamic_ext = $dynamic_list
static_ext = $static_list
nonxs_ext = $nonxs_list

Cross/config.sh-arm-linux  view on Meta::CPAN

usemorebits='undef'
usemultiplicity='undef'
usemymalloc='n'
usenm='false'
usensgetexecutablepath='undef'
useopcode='true'
useperlio='define'
useposix='true'
usequadmath='undef'
usereentrant='undef'
userelocatableinc='undef'
useshrplib='true'
usesitecustomize='undef'
usesocks='undef'
usethreads='undef'
usevendorprefix='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
uvXUformat='"lX"'
uvoformat='"lo"'

Cross/config.sh-arm-linux-n770  view on Meta::CPAN

usemorebits='undef'
usemultiplicity='undef'
usemymalloc='n'
usenm='false'
usensgetexecutablepath='undef'
useopcode='true'
useperlio='define'
useposix='true'
usequadmath='undef'
usereentrant='undef'
userelocatableinc='undef'
useshrplib='true'
usesitecustomize='undef'
usesocks='undef'
usethreads='undef'
usevendorprefix='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
uvXUformat='"lX"'
uvoformat='"lo"'

INSTALL  view on Meta::CPAN

    make
    make test
    make install DESTDIR=/tmp/perl5
    cd /tmp/perl5/opt/perl
    tar cvf /tmp/perl5-archive.tar .

=back

=head2 Relocatable @INC

To create a relocatable perl tree, use the following command line:

    sh Configure -Duserelocatableinc

Then the paths in @INC (and everything else in %Config) can be
optionally located via the path of the perl executable.

That means that, if the string ".../" is found at the start of any
path, it's substituted with the directory of $^X. So, the relocation
can be configured on a per-directory basis, although the default with
"-Duserelocatableinc" is that everything is relocated. The initial
install is done to the original configured prefix.

This option is not compatible with the building of a shared libperl
("-Duseshrplib"), because in that case perl is linked with an hard-coded
rpath that points at the libperl.so, that cannot be relocated.

=head2 Site-wide Policy settings

After Configure runs, it stores a number of common site-wide "policy"
answers (such as installation directories) in the Policy.sh file.
If you want to build perl on another system using the same policy
defaults, simply copy the Policy.sh file to the new system's perl build
directory, and Configure will use it. This will work even if Policy.sh was
generated for another version of Perl, or on a system with a
different architecture and/or operating system. However, in such cases,

Makefile.SH  view on Meta::CPAN

CCDLFLAGS = $ccdlflags
DLSUFFIX = .$dlext
PLDLFLAGS = $pldlflags
LIBPERL = $libperl
LLIBPERL= $linklibperl
SHRPENV = $shrpenv

# Static targets are ordinarily built without CCCDLFLAGS.  However,
# if building a shared libperl.so that might later be linked into
# another application, then it might be appropriate to also build static
# extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC
# for GNU cc).
STATIC_LDFLAGS = $static_ldflags

# The following is used to include the current directory in
# the dynamic loader path you are building a shared libperl.
LDLIBPTH = $ldlibpth

# Sometimes running an executable is an adventure.
RUN = 

Porting/Glossary  view on Meta::CPAN

incpth (libpth.U):
	This variable must precede the normal include path to get the
	right one, as in "$incpath/usr/include" or "$incpath/usr/lib".
	Value can be "" or "/bsd43" on mips.

inews (Loc.U):
	This variable is defined but not used by Configure.
	The value is the empty string and is not useful.

initialinstalllocation (bin.U):
	When userelocatableinc is true, this variable holds the location
	that make install should copy the perl binary to, with all the
	run-time relocatable paths calculated from this at install time.
	When used, it is initialized to the original value of binexp, and
	then binexp is set to '.../', as the other binaries are found
	relative to the perl binary.

installarchlib (archlib.U):
	This variable is really the same as archlibexp but may differ on
	those systems using AFS. For extra portability, only this variable
	should be used in makefiles.

installbin (bin.U):

Porting/Glossary  view on Meta::CPAN

	and indicates that the quadmath library __float128 long doubles
	should be used when available.

usereentrant (usethreads.U):
	This variable conditionally defines the USE_REENTRANT_API symbol,
	which indicates that the thread code may try to use the various
	_r versions of library functions.  This is only potentially
	meaningful if usethreads is set and is very experimental, it is
	not even prompted for.

userelocatableinc (bin.U):
	This variable is set to true to indicate that perl should relocate
	@INC entries at runtime based on the path to the perl binary.
	Any @INC paths starting ".../" are relocated relative to the directory
	containing the perl binary, and a logical cleanup of the path is then
	made around the join point (removing "dir/../" pairs)

useshrplib (libperl.U):
	This variable is set to 'true' if the user wishes
	to build a shared libperl, and 'false' otherwise.

usesitecustomize (d_sitecustomize.U):
	This variable is set to true when the user requires a mechanism that
	allows the sysadmin to add entries to @INC at runtime.  This variable

Porting/config.sh  view on Meta::CPAN

usemorebits='undef'
usemultiplicity='define'
usemymalloc='n'
usenm='false'
usensgetexecutablepath='undef'
useopcode='true'
useperlio='define'
useposix='true'
usequadmath='define'
usereentrant='undef'
userelocatableinc='undef'
useshrplib='false'
usesitecustomize='undef'
usesocks='undef'
usethreads='define'
usevendorprefix='undef'
useversionedarchname='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
uvXUformat='"lX"'

Porting/config_H  view on Meta::CPAN


/* BIN:
 *	This symbol holds the path of the bin directory where the package will
 *	be installed. Program must be prepared to deal with ~name substitution.
 */
/* BIN_EXP:
 *	This symbol is the filename expanded version of the BIN symbol, for
 *	programs that do not want to deal with that at run-time.
 */
/* PERL_RELOCATABLE_INC:
 *	This symbol, if defined, indicates that we'd like to relocate entries
 *	in @INC at run time based on the location of the perl binary.
 */
#define BIN "/opt/perl/bin"	/**/
#define BIN_EXP "/opt/perl/bin"	/**/
#define PERL_RELOCATABLE_INC "undef" 		/**/

/* PERL_INC_VERSION_LIST:
 *	This variable specifies the list of subdirectories in over
 *	which perl.c:incpush() and lib/lib.pm will automatically
 *	search when adding directories to @INC, in a format suitable

Porting/release_managers_guide.pod  view on Meta::CPAN

some sets of Configure flags you can try:

=over 4

=item *

C<-Duseshrplib -Dusesitecustomize>

=item *

C<-Duserelocatableinc>

=item *

C<-Dusethreads>

=back

If you have multiple compilers on your machine, you might also consider
compiling with C<-Dcc=$other_compiler>.

README.os2  view on Meta::CPAN

of F<perl.dll>.

The address tables of DLLs are patched only once, when they are
loaded. The addresses of the entry points into DLLs are guaranteed to be
the same for all the programs which use the same DLL.  This removes the
runtime fixup - once DLL is loaded, its code is read-only.

While this allows some (significant?) performance advantages, this makes life
much harder for developers, since the above scheme makes it impossible
for a DLL to be "linked" to a symbol in the F<.EXE> file.  Indeed, this
would need a DLL to have different relocations tables for the
(different) executables which use this DLL.

However, a dynamically loaded Perl extension is forced to use some symbols
from the perl
executable, e.g., to know how to find the arguments to the functions:
the arguments live on the perl
internal evaluation stack. The solution is to put the main code of
the interpreter into a DLL, and make the F<.EXE> file which just loads
this DLL into memory and supplies command-arguments.  The extension DLL
cannot link to symbols in F<.EXE>, but it has no problem linking

README.solaris  view on Meta::CPAN

=head1 MAKE PROBLEMS

=over 4

=item Dynamic Loading Problems With GNU as and GNU ld

If you have problems with dynamic loading using gcc on SunOS or
Solaris, and you are using GNU as and GNU ld, see the section
L</"GNU as and GNU ld"> above.

=item ld.so.1: ./perl: fatal: relocation error:

If you get this message on SunOS or Solaris, and you're using gcc,
it's probably the GNU as or GNU ld problem in the previous item
L</"GNU as and GNU ld">.

=item dlopen: stub interception failed

The primary cause of the 'dlopen: stub interception failed' message is
that the LD_LIBRARY_PATH environment variable includes a directory
which is a symlink to /usr/lib (such as /lib).  See

README.solaris  view on Meta::CPAN

It may be possible to use the Entropy Gathering Daemon (written in
Perl!), available from L<http://www.lothar.com/tech/crypto/>.

=head1 SunOS 4.x

In SunOS 4.x you most probably want to use the SunOS ld, /usr/bin/ld,
since the more recent versions of GNU ld (like 2.13) do not seem to
work for building Perl anymore.  When linking the extensions, the
GNU ld gets very unhappy and spews a lot of errors like this

  ... relocation truncated to fit: BASE13 ...

and dies.  Therefore the SunOS 4.1 hints file explicitly sets the
ld to be F</usr/bin/ld>.

As of Perl 5.8.1 the dynamic loading of libraries (DynaLoader, XSLoader)
also seems to have become broken in in SunOS 4.x.  Therefore the default
is to build Perl statically.

Running the test suite in SunOS 4.1 is a bit tricky since the
F<dist/Tie-File/t/09_gen_rs.t> test hangs (subtest #51, FWIW) for some

config_h.SH  view on Meta::CPAN


/* BIN:
 *	This symbol holds the path of the bin directory where the package will
 *	be installed. Program must be prepared to deal with ~name substitution.
 */
/* BIN_EXP:
 *	This symbol is the filename expanded version of the BIN symbol, for
 *	programs that do not want to deal with that at run-time.
 */
/* PERL_RELOCATABLE_INC:
 *	This symbol, if defined, indicates that we'd like to relocate entries
 *	in @INC at run time based on the location of the perl binary.
 */
#define BIN "$bin"	/**/
#define BIN_EXP "$binexp"	/**/
#define PERL_RELOCATABLE_INC "$userelocatableinc"		/**/

/* PERL_INC_VERSION_LIST:
 *	This variable specifies the list of subdirectories in over
 *	which perl.c:incpush() and lib/lib.pm will automatically
 *	search when adding directories to @INC, in a format suitable
 *	for a C initialization string.  See the inc_version_list entry
 *	in Porting/Glossary for more details.
 */
#$d_inc_version_list PERL_INC_VERSION_LIST $inc_version_list_init		/**/

configpm  view on Meta::CPAN

    $byteorder_code = <<"EOT";

my \$i = ord($s);
foreach my \$c ($list) { \$i <<= 8; \$i |= ord(\$c); }
our \$byteorder = join('', unpack('$format', pack('$f', \$i)));
EOT
} else {
    $byteorder_code = "our \$byteorder = '?'x$s;\n";
}

my @need_relocation;

if (fetch_string({},'userelocatableinc')) {
    foreach my $what (qw(prefixexp

			 archlibexp
			 html1direxp
			 html3direxp
			 man1direxp
			 man3direxp
			 privlibexp
			 scriptdirexp
			 sitearchexp

configpm  view on Meta::CPAN

			 installsitescript
			 installvendorarch
			 installvendorbin
			 installvendorhtml1dir
			 installvendorhtml3dir
			 installvendorlib
			 installvendorman1dir
			 installvendorman3dir
			 installvendorscript
			 )) {
	push @need_relocation, $what if fetch_string({}, $what) =~ m!^\.\.\./!;
    }
}

my %need_relocation;
@need_relocation{@need_relocation} = @need_relocation;

# This can have .../ anywhere:
if (fetch_string({}, 'otherlibdirs') =~ m!\.\.\./!) {
    $need_relocation{otherlibdirs} = 'otherlibdirs';
}

my $relocation_code = uncomment <<'EOT';
#
#    sub relocate_inc {
#      my $libdir = shift;
#      return $libdir unless $libdir =~ s!^\.\.\./!!;
#      my $prefix = $^X;
#      if ($prefix =~ s!/[^/]*$!!) {
#        while ($libdir =~ m!^\.\./!) {
#          # Loop while $libdir starts "../" and $prefix still has a trailing
#          # directory
#          last unless $prefix =~ s!/([^/]+)$!!;
#          # but bail out if the directory we picked off the end of $prefix is .
#          # or ..

configpm  view on Meta::CPAN

#        }
#        print "  \@INC:\n";
#        print "    $_\n" foreach @INC;
#    }
#
#    sub header_files {
ENDOFBEG

$heavy_txt .= $header_files . "\n}\n\n";

if (%need_relocation) {
  my $relocations_in_common;
  # otherlibdirs only features in the hash
  foreach (keys %need_relocation) {
    $relocations_in_common++ if $Common{$_};
  }
  if ($relocations_in_common) {
    $config_txt .= $relocation_code;
  } else {
    $heavy_txt .= $relocation_code;
  }
}

$heavy_txt .= join('', @non_v) . "\n";

# copy config summary format from the myconfig.SH script
$heavy_txt .= "our \$summary = <<'!END!';\n";
open(MYCONFIG,'<','myconfig.SH') || die "open myconfig.SH failed: $!";
1 while defined($_ = <MYCONFIG>) && !/^Summary of/;
do { $heavy_txt .= $_ } until !defined($_ = <MYCONFIG>) || /^\s*$/;

configpm  view on Meta::CPAN

#                                 ? "silent" : "define";
#            s/^(taint_disabled=['"])(["'])/$1$taint_disabled$2/m;
#        }
#        else {
#            my $taint_support = 'define';
#            s/^(taint_support=['"])(["'])/$1$taint_support$2/m;
#        }
#    }
EOF_TAINT_INIT

if (@need_relocation) {
$heavy_txt .= 'foreach my $what (qw(' . join (' ', @need_relocation) .
      ")) {\n" . uncomment <<'EOT';
#        s/^($what=)(['"])(.*?)\2/$1 . $2 . relocate_inc($3) . $2/me;
#    }
EOT
# Currently it only makes sense to do the ... relocation on Unix, so there's
# no need to emulate the "which separator for this platform" logic in perl.c -
# ':' will always be applicable
if ($need_relocation{otherlibdirs}) {
$heavy_txt .= uncomment << 'EOT';
#    s{^(otherlibdirs=)(['"])(.*?)\2}
#     {$1 . $2 . join ':', map {relocate_inc($_)} split ':', $3 . $2}me;
EOT
}
}

$heavy_txt .= uncomment <<'EOT';
#    my $config_sh_len = length $_;
#
#    our $Config_SH_expanded = "\n$_" . << 'EOVIRTUAL';
EOT

configpm  view on Meta::CPAN

foreach my $key (keys %Common) {
    my $value = fetch_string ({}, $key);
    # Is it safe on the LHS of => ?
    my $qkey = $key =~ /^[A-Za-z_][A-Za-z0-9_]*$/ ? $key : "'$key'";
    if (defined $value) {
	# Quote things for a '' string
	$value =~ s!\\!\\\\!g;
	$value =~ s!'!\\'!g;
	$value = "'$value'";
	if ($key eq 'otherlibdirs') {
	    $value = "join (':', map {relocate_inc(\$_)} split (':', $value))";
	} elsif ($need_relocation{$key}) {
	    $value = "relocate_inc($value)";
	}
    } else {
	$value = "undef";
    }
    $Common{$key} = "$qkey => $value";
}

if ($Common{byteorder}) {
    $Common{byteorder} = 'byteorder => $byteorder';
}

configure.com  view on Meta::CPAN

$ WC "usensgetexecutablepath='undef'"
$ WC "uselargefiles='" + uselargefiles + "'"
$ WC "uselongdouble='" + uselongdouble + "'"
$ WC "usemorebits='" + usemorebits + "'"
$ WC "usemultiplicity='" + usemultiplicity + "'"
$ WC "usemymalloc='" + usemymalloc + "'"
$ WC "useperlio='define'"
$ WC "useposix='false'"
$ WC "usequadmath='undef'"
$ WC "usereentrant='undef'"
$ WC "userelocatableinc='undef'"
$ WC "usesecurelog='" + usesecurelog + "'"  ! VMS-specific
$ WC "useshortenedsymbols='" + useshortenedsymbols + "'"    ! VMS-specific
$ WC "useshrplib='true'"
$ WC "usesitecustomize='" + usesitecustomize + "'"
$ WC "usesocks='undef'"
$ WC "usethreads='" + usethreads + "'"
$ WC "usethreadupcalls='" + usethreadupcalls + "'"	! VMS-specific
$ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01
$ WC "useversionedarchname='" + useversionedarchname + "'"
$ WC "usevfork='true'"

cpan/Encode/lib/Encode/GSM0338.pm  view on Meta::CPAN

  $unicode = decode("gsm0338", $gsm0338); # ditto

=head1 DESCRIPTION

GSM0338 is for GSM handsets. Though it shares alphanumerals with ASCII,
control character ranges and other parts are mapped very differently,
mainly to store Greek characters.  There are also escape sequences
(starting with 0x1B) to cover e.g. the Euro sign.

This was once handled by L<Encode::Bytes> but because of all those
unusual specifications, Encode 2.20 has relocated the support to
this module.

This module implements only I<GSM 7 bit Default Alphabet> and
I<GSM 7 bit default alphabet extension table> according to standard
3GPP TS 23.038 version 16. Therefore I<National Language Single Shift>
and I<National Language Locking Shift> are not implemented nor supported.

=head2 Septets

This modules operates with octets (like any other Encode module) and not

cpan/Encode/lib/Encode/Supported.pod  view on Meta::CPAN

=back

=head2 gsm0338 - Hentai Latin 1

GSM0338 is for GSM handsets. Though it shares alphanumerals with
ASCII, control character ranges and other parts are mapped very
differently, mainly to store Greek characters.  There are also escape
sequences (starting with 0x1B) to cover e.g. the Euro sign.  

This was once handled by L<Encode::Bytes> but because of all those
unusual specifications, Encode 2.20 has relocated the support to
L<Encode::GSM0338>. See L<Encode::GSM0338> for details.

=over 2

=item gsm0338 support before 2.19

Some special cases like a trailing 0x00 byte or a lone 0x1B byte are not
well-defined and decode() will return an empty string for them.
One possible workaround is

cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm  view on Meta::CPAN


sub mkfh()
{
no strict;
local $^W;
my $fh = \*{$fhname++};
use strict;
return($fh);
}

=item __find_relocations

Works out what absolute paths in the configuration have been located at run
time relative to $^X, and generates a regexp that matches them

=back

=end _undocumented

=cut

sub __find_relocations
{
    my %paths;
    while (my ($raw_key, $raw_val) = each %Config) {
	my $exp_key = $raw_key . "exp";
	next unless exists $Config{$exp_key};
	next unless $raw_val =~ m!\.\.\./!;
	$paths{$Config{$exp_key}}++;
    }
    # Longest prefixes go first in the alternatives
    my $alternations = join "|", map {quotemeta $_}

cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm  view on Meta::CPAN

my ($line);
while (defined($line = <$fh>))
   {
   chomp $line;
   my ($key, $data) = $line;
   if ($key =~ /^(.*?)( \w+=.*)$/)
      {
      $key = $1;
      $data = { map { split('=', $_) } split(' ', $2)};

      if ($Config{userelocatableinc} && $data->{relocate_as})
      {
	  require File::Spec;
	  require Cwd;
	  my ($vol, $dir) = File::Spec->splitpath($packfile);
	  my $newpath = File::Spec->catpath($vol, $dir, $data->{relocate_as});
	  $key = Cwd::realpath($newpath);
      }
         }
   $key =~ s!/\./!/!g;   # Some .packlists have spurious '/./' bits in the paths
      $self->{data}->{$key} = $data;
      }
close($fh);
}

sub write($;$)

cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm  view on Meta::CPAN

my ($self, $packfile) = @_;
$self = tied(%$self) || $self;
if (defined($packfile)) { $self->{packfile} = $packfile; }
else { $packfile = $self->{packfile}; }
Carp::croak("No packlist filename specified") if (! defined($packfile));
my $fh = mkfh();
open($fh, ">$packfile") || Carp::croak("Can't open file $packfile: $!");
foreach my $key (sort(keys(%{$self->{data}})))
   {
       my $data = $self->{data}->{$key};
       if ($Config{userelocatableinc}) {
	   $Relocations ||= __find_relocations();
	   if ($packfile =~ $Relocations) {
	       # We are writing into a subdirectory of a run-time relocated
	       # path. Figure out if the this file is also within a subdir.
	       my $prefix = $1;
	       if (File::Spec->no_upwards(File::Spec->abs2rel($key, $prefix)))
	       {
		   # The relocated path is within the found prefix
		   my $packfile_prefix;
		   (undef, $packfile_prefix)
		       = File::Spec->splitpath($packfile);

		   my $relocate_as
		       = File::Spec->abs2rel($key, $packfile_prefix);

		   if (!ref $data) {
		       $data = {};
		   }
		   $data->{relocate_as} = $relocate_as;
	       }
	   }
       }
   print $fh ("$key");
   if (ref($data))
      {
      foreach my $k (sort(keys(%$data)))
         {
         print $fh (" $k=$data->{$k}");
         }

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm  view on Meta::CPAN


sub _fixin_replace_shebang {
    my ( $self, $file, $line ) = @_;

    # Now figure out the interpreter name.
    my ( $origcmd, $arg ) = split ' ', $line, 2;
    (my $cmd = $origcmd) =~ s!^.*/!!;

    # Now look (in reverse) for interpreter in absolute PATH (unless perl).
    my $interpreter;
    if ( defined $ENV{PERL_MM_SHEBANG} && $ENV{PERL_MM_SHEBANG} eq "relocatable" ) {
        $interpreter = "/usr/bin/env perl";
    }
    elsif ( $cmd =~ m{^perl(?:\z|[^a-z])} ) {
        if ( $Config{startperl} =~ m,^\#!.*/perl, ) {
            $interpreter = $Config{startperl};
            $interpreter =~ s,^\#!,,;
        }
        else {
            $interpreter = $Config{perlpath};
        }

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm  view on Meta::CPAN

	    }
	}
    }

    if ($Is{Android}) {
    	# Android fun times!
    	# ../../perl -I../../lib -MFile::Glob -e1 works
    	# ../../../perl -I../../../lib -MFile::Glob -e1 fails to find
    	# the .so for File::Glob.
    	# This always affects core perl, but may also affect an installed
    	# perl built with -Duserelocatableinc.
    	$self->{PERL_LIB} = File::Spec->rel2abs($self->{PERL_LIB});
    	$self->{PERL_ARCHLIB} = File::Spec->rel2abs($self->{PERL_ARCHLIB});
    }
    $self->{PERL_INCDEP} = $self->{PERL_INC};
    $self->{PERL_ARCHLIBDEP} = $self->{PERL_ARCHLIB};

    # We get SITELIBEXP and SITEARCHEXP directly via
    # Get_from_Config. When we are running standard modules, these
    # won't matter, we will set INSTALLDIRS to "perl". Otherwise we
    # set it to "site". I prefer that INSTALLDIRS be set from outside

dist/Devel-PPPort/parts/base/5015006  view on Meta::CPAN

5.015006
check_locale_boundary_crossing # F added by devel/scanprov
FOLD_FLAGS_FULL                # Z added by devel/scanprov
FOLD_FLAGS_LOCALE              # Z added by devel/scanprov
I8_TO_NATIVE                   # Z added by devel/scanprov
KEY___SUB                      # Z added by devel/scanprov
LvFLAGS                        # Z added by devel/scanprov
mayberelocate                  # F added by devel/scanprov
minus_v                        # F added by devel/scanprov
NATIVE_TO_I8                   # Z added by devel/scanprov
newCONSTSUB_flags              # A
newXS_len_flags                # F added by devel/scanprov
OPpALLOW_FAKE                  # Z added by devel/scanprov
OPpSUBSTR_REPL_FIRST           # Z added by devel/scanprov
report_redefined_cv            # F added by devel/scanprov
_to_utf8_lower_flags           # F added by devel/scanprov
_to_utf8_title_flags           # F added by devel/scanprov
_to_utf8_upper_flags           # F added by devel/scanprov

dist/Devel-PPPort/parts/base/5021005  view on Meta::CPAN

newMETHOP_internal             # F added by devel/scanprov
newMETHOP_named                # U
OA_METHOP                      # Z added by devel/scanprov
OPpLVREF_AV                    # Z added by devel/scanprov
OPpLVREF_CV                    # Z added by devel/scanprov
OPpLVREF_ELEM                  # Z added by devel/scanprov
OPpLVREF_HV                    # Z added by devel/scanprov
OPpLVREF_ITER                  # Z added by devel/scanprov
OPpLVREF_SV                    # Z added by devel/scanprov
OPpLVREF_TYPE                  # Z added by devel/scanprov
op_relocate_sv                 # F added by devel/scanprov
PERL_MAGIC_debugvar            # E
PERL_MAGIC_lvref               # E
PERL_PV_PRETTY_EXACTSIZE       # Z added by devel/scanprov
PERL_SYS_FPU_INIT              # Z added by devel/scanprov
PL_DBcontrol                   # Z added by devel/scanprov
PL_DBsignal_iv                 # Z added by devel/scanprov
PL_DBsingle_iv                 # Z added by devel/scanprov
PL_DBtrace_iv                  # Z added by devel/scanprov
PL_vtbl_debugvar               # Z added by devel/scanprov
PL_vtbl_lvref                  # Z added by devel/scanprov

dist/Devel-PPPort/parts/embed.fnc  view on Meta::CPAN

pEXTR	|const char *|cntrl_to_mnemonic|const U8 c
p	|CV *	|find_lexical_cv|PADOFFSET off
: Defined in util.c, used only in perl.c
p	|char*	|find_script	|NN const char *scriptname|bool dosearch \
				|NULLOK const char *const *const search_ext|I32 flags
#if defined(PERL_IN_OP_C)
S	|OP*	|force_list	|NULLOK OP* arg|bool nullit
i	|OP*	|op_integerize	|NN OP *o
i	|OP*	|op_std_init	|NN OP *o
#if defined(USE_ITHREADS)
i	|void	|op_relocate_sv	|NN SV** svp|NN PADOFFSET* targp
#endif
i	|OP*	|newMETHOP_internal	|I32 type|I32 flags|NULLOK OP* dynamic_meth \
					|NULLOK SV* const_meth
: FIXME
S	|OP*	|fold_constants	|NN OP * const o
Sd	|OP*	|traverse_op_tree|NN OP* top|NN OP* o
#endif
Afpd	|char*	|form		|NN const char* pat|...
Adp	|char*	|vform		|NN const char* pat|NULLOK va_list* args
Cp	|void	|free_tmps

dist/Devel-PPPort/parts/embed.fnc  view on Meta::CPAN

poex	|OP *	|op_refcnt_inc	|NULLOK OP *o
: FIXME - can be static.
poex	|PADOFFSET	|op_refcnt_dec	|NN OP *o
#endif

#if defined(PERL_IN_PERL_C)
S	|void	|find_beginning	|NN SV* linestr_sv|NN PerlIO *rsfp
S	|void	|forbid_setid	|const char flag|const bool suidscript
S	|void	|incpush	|NN const char *const dir|STRLEN len \
				|U32 flags
S	|SV*	|mayberelocate	|NN const char *const dir|STRLEN len \
				|U32 flags
S	|void	|incpush_use_sep|NN const char *p|STRLEN len|U32 flags
S	|void	|init_interp
S	|void	|init_ids
S	|void	|init_main_stash
S	|void	|init_perllib
S	|void	|init_postdump_symbols|int argc|NN char **argv|NULLOK char **env
S	|void	|init_predump_symbols
rS	|void	|my_exit_jump
S	|void	|nuke_stacks

dist/lib/lib_pm.PL  view on Meta::CPAN

my $file = basename($0, '.PL');
$file =~ s/_(pm)$/.$1/i;

my $useConfig;
my $Config_archname;
my $Config_version;
my $Config_inc_version_list;

# Expand the variables only if explicitly requested
# or if a previously installed lib.pm does this, too
# because otherwise relocating Perl becomes much harder.

my $expand_config_vars = 0;
if ($ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) {
  $expand_config_vars = 1;
}
elsif (exists $ENV{PERL_BUILD_EXPAND_CONFIG_VARS}) {
  $expand_config_vars = 0;
}
else {
  eval <<'HERE';

embed.fnc  view on Meta::CPAN

				|U32 flags
S	|void	|init_ids
S	|void	|init_interp
S	|void	|init_main_stash
S	|void	|init_perllib
S	|void	|init_postdump_symbols					\
				|int argc				\
				|NN char **argv 			\
				|NULLOK char **env
S	|void	|init_predump_symbols
S	|SV *	|mayberelocate	|NN const char * const dir		\
				|STRLEN len				\
				|U32 flags
Sr	|void	|minus_v
Sr	|void	|my_exit_jump
S	|void	|nuke_stacks
S	|PerlIO *|open_script	|NN const char *scriptname		\
				|bool dosearch				\
				|NN bool *suidscript

S	|void * |parse_body	|NULLOK char **env			\

embed.fnc  view on Meta::CPAN

				|NN CLONE_PARAMS * const param
CRdp	|PERL_SI *|si_dup	|NULLOK PERL_SI *si			\
				|NN CLONE_PARAMS *param
CRdp	|ANY *	|ss_dup 	|NN PerlInterpreter *proto_perl 	\
				|NN CLONE_PARAMS *param
ARp	|SV *	|sv_dup 	|NULLOK const SV * const ssv		\
				|NN CLONE_PARAMS * const param
ARp	|SV *	|sv_dup_inc	|NULLOK const SV * const ssv		\
				|NN CLONE_PARAMS * const param
# if defined(PERL_IN_OP_C) || defined(PERL_IN_PEEP_C)
p	|void	|op_relocate_sv |NN SV **svp				\
				|NN PADOFFSET *targp
# endif
#else /* if !defined(USE_ITHREADS) */
Adm	|void	|CopFILEGV_set	|NN COP *c				\
				|NN GV *gv
#endif
#if defined(USE_LOCALE_COLLATE)
p	|int	|magic_freecollxfrm					\
				|NN SV *sv				\
				|NN MAGIC *mg

embed.h  view on Meta::CPAN

#     define find_beginning(a,b)                S_find_beginning(aTHX_ a,b)
#     define forbid_setid(a,b)                  S_forbid_setid(aTHX_ a,b)
#     define incpush(a,b,c)                     S_incpush(aTHX_ a,b,c)
#     define incpush_use_sep(a,b,c)             S_incpush_use_sep(aTHX_ a,b,c)
#     define init_ids()                         S_init_ids(aTHX)
#     define init_interp()                      S_init_interp(aTHX)
#     define init_main_stash()                  S_init_main_stash(aTHX)
#     define init_perllib()                     S_init_perllib(aTHX)
#     define init_postdump_symbols(a,b,c)       S_init_postdump_symbols(aTHX_ a,b,c)
#     define init_predump_symbols()             S_init_predump_symbols(aTHX)
#     define mayberelocate(a,b,c)               S_mayberelocate(aTHX_ a,b,c)
#     define minus_v()                          S_minus_v(aTHX)
#     define my_exit_jump()                     S_my_exit_jump(aTHX)
#     define nuke_stacks()                      S_nuke_stacks(aTHX)
#     define open_script(a,b,c)                 S_open_script(aTHX_ a,b,c)
#     define parse_body(a,b)                    S_parse_body(aTHX_ a,b)
#     define run_body(a)                        S_run_body(aTHX_ a)
#     define usage()                            S_usage(aTHX)
#     if !defined(PERL_IS_MINIPERL)
#       define incpush_if_exists(a,b,c)         S_incpush_if_exists(aTHX_ a,b,c)
#     endif

embed.h  view on Meta::CPAN

#   endif
#   if defined(USE_ITHREADS)
#     define mro_meta_dup(a,b)                  Perl_mro_meta_dup(aTHX_ a,b)
#     define padlist_dup(a,b)                   Perl_padlist_dup(aTHX_ a,b)
#     define padname_dup(a,b)                   Perl_padname_dup(aTHX_ a,b)
#     define padnamelist_dup(a,b)               Perl_padnamelist_dup(aTHX_ a,b)
#     if !defined(PERL_IMPLICIT_SYS)
#       define PerlEnv_putenv(a)                S_PerlEnv_putenv(aTHX_ a)
#     endif
#     if defined(PERL_IN_OP_C) || defined(PERL_IN_PEEP_C)
#       define op_relocate_sv(a,b)              Perl_op_relocate_sv(aTHX_ a,b)
#     endif
#   endif /* defined(USE_ITHREADS) */
#   if defined(USE_LOCALE_COLLATE)
#     define magic_freecollxfrm(a,b)            Perl_magic_freecollxfrm(aTHX_ a,b)
#     define magic_setcollxfrm(a,b)             Perl_magic_setcollxfrm(aTHX_ a,b)
#   endif
#   if defined(USE_PERLIO)
#     define PerlIO_restore_errno(a)            Perl_PerlIO_restore_errno(aTHX_ a)
#     define PerlIO_save_errno(a)               Perl_PerlIO_save_errno(aTHX_ a)
#   endif

ext/DynaLoader/DynaLoader_pm.PL  view on Meta::CPAN

If it is defined and perl is compiled with the C macro C<DL_UNLOAD_ALL_AT_EXIT>
defined, then it is called automatically when the interpreter exits for
every shared object or library loaded by DynaLoader::bootstrap.  All such
library references are stored in @dl_librefs by DynaLoader::Bootstrap as it
loads the libraries.  The files are unloaded in last-in, first-out order.

This unloading is usually necessary when embedding a shared-object perl (e.g.
one configured with -Duseshrplib) within a larger application, and the perl
interpreter is created and destroyed several times within the lifetime of the
application.  In this case it is possible that the system dynamic linker will
unload and then subsequently reload the shared libperl without relocating any
references to it from any files DynaLoaded by the previous incarnation of the
interpreter.  As a result, any shared objects opened by DynaLoader may point to
a now invalid 'ghost' of the libperl shared object, causing apparently random
memory corruption and crashes.  This behaviour is most commonly seen when using
Apache and mod_perl built with the APXS mechanism.

    SunOS: dlclose($libref)
    HP-UX: ???
    Linux: ???
    VMS:   ???

ext/DynaLoader/dl_aix.xs  view on Meta::CPAN


/*
 * We simulate dlopen() et al. through a call to load. Because AIX has
 * no call to find an exported symbol we read the loader section of the
 * loaded module and build a list of exported symbols and their virtual
 * address.
 */

typedef struct {
	char		*name;		/* the symbols's name */
	void		*addr;		/* its relocated virtual address */
} Export, *ExportPtr;

/*
 * The void * handle returned from dlopen is actually a ModulePtr.
 */
typedef struct Module {
	struct Module	*next;
	char		*name;		/* module name for refcounting */
	int		refCnt;		/* the number of references */
	void		*entry;		/* entry point from load */

ext/Pod-Html/lib/Pod/Html/Util.pm  view on Meta::CPAN

=head1 NAME

Pod::Html::Util - helper functions for Pod-Html

=head1 SUBROUTINES

B<Note:> While these functions are importable on request from
F<Pod::Html::Util>, they are specifically intended for use within (a) the
F<Pod-Html> distribution (modules and test programs) shipped as part of the
Perl 5 core and (b) other parts of the core such as the F<installhtml>
program.  These functions may be modified or relocated within the core
distribution -- or removed entirely therefrom -- as the core's needs evolve.
Hence, you should not rely on these functions in situations other than those
just described.

=cut

=head2 C<process_command_line()>

Process command-line switches (options).  Returns a reference to a hash.  Will
provide usage message if C<--help> switch is present or if parameters are

hints/linux-android.sh  view on Meta::CPAN

# set -x

# Install the perl and its libraries anywhere:
case "$userelocatableinc" in
'') userelocatableinc='define' ;;
esac

# The Android linker has some unusual behavior: No matter what
# path is passed in to dlopen(), it'll only use the path's
# basename when trying to find a cached library.
# Unfortunately, this is quite problematic for us, since for example,
# Hash::Util and List::Util both end up creating a Util.so --
# So if you load List::Util and then Hash::Util, the dlopen() for
# the latter will return the handle for the former.
# See the implementation for details:

hints/linux.sh  view on Meta::CPAN

*"Intel(R) C"*" Compiler"*)
    # record the version, formats:
    # icc (ICC) 10.1 20080801
    # icpc (ICC) 10.1 20080801
    # followed by a copyright on the second line
    ccversion=`${cc:-cc} --version | sed -n -e 's/^icp\?c \((ICC) \)\?//p'`
    # This is needed for Configure's prototype checks to work correctly
    # The -mp flag is needed to pass various floating point related tests
    # The -no-gcc flag is needed otherwise, icc pretends (poorly) to be gcc
    ccflags="-we147 -mp -no-gcc $ccflags"
    # Prevent relocation errors on 64bits arch
    case "$uname_minus_m" in
	*ia64*|*x86_64*)
	    cccdlflags='-fPIC'
	;;
    esac
    # If we're using ICC, we usually want the best performance
    case "$optimize" in
    '') optimize='-O3' ;;
    esac
    ;;



( run in 1.741 second using v1.01-cache-2.11-cpan-5511b514fd6 )