Rafael Garcia-Suarez
2008-12-25 23:24:59 UTC
In perl.git, the branch blead has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/54ad55c59e2227f3197e56a9a85b1f78d0229ac7?hp=d4222de00860407a7c86f19fdb5531ac98b1b7ad>
- Log -----------------------------------------------------------------
commit 54ad55c59e2227f3197e56a9a85b1f78d0229ac7
Author: Rafael Garcia-Suarez <***@gmail.com>
Date: Fri Dec 26 00:24:20 2008 +0100
Add description of last commit in perldelta
(see ccb8f6a64f3dd06b4360bc27c194b28e6766a6ad)
M pod/perl5110delta.pod
commit ccb8f6a64f3dd06b4360bc27c194b28e6766a6ad
Author: Renee Baecker <***@smart-websolutions.de>
Date: Fri Dec 26 00:15:25 2008 +0100
[perl #6665] Different behavior using the -Idir option on the command line and inside a perl script
Adds the -Idir at the beginning of @INC.
(Plus a test by rgs -- check that -I does not add directories at the end
of the @INC array anymore)
M perl.c
M t/run/switchI.t
commit 0147cd53faa57ffcd05cb0455b952fbfbe63b0b2
Author: Matt Kraai <***@ftbfs.org>
Date: Thu Jul 3 14:04:44 2008 -0700
Use the F formatting codes for filenames in pod/perlguts.pod.
M pod/perlguts.pod
-----------------------------------------------------------------------
Summary of changes:
perl.c | 8 +++++---
pod/perl5110delta.pod | 9 +++++++++
pod/perlguts.pod | 6 +++---
t/run/switchI.t | 4 ++--
4 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/perl.c b/perl.c
index 021f35d..deb9d38 100644
--- a/perl.c
+++ b/perl.c
@@ -4873,7 +4873,8 @@ S_incpush_if_exists(pTHX_ SV *dir)
if (PerlLIO_stat(SvPVX_const(dir), &tmpstatbuf) >= 0 &&
S_ISDIR(tmpstatbuf.st_mode)) {
- av_push(GvAVn(PL_incgv), dir);
+ av_unshift( GvAVn( PL_incgv ), 1 );
+ av_store( GvAVn( PL_incgv ), 0, dir );
dir = newSV(0);
}
return dir;
@@ -5093,8 +5094,9 @@ S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep,
#endif
}
- /* finally push this lib directory on the end of @INC */
- av_push(GvAVn(PL_incgv), libdir);
+ /* finally add this lib directory at the beginning of @INC */
+ av_unshift( GvAVn( PL_incgv ), 1 );
+ av_store( GvAVn( PL_incgv ), 0, libdir );
}
if (subdir) {
assert (SvREFCNT(subdir) == 1);
diff --git a/pod/perl5110delta.pod b/pod/perl5110delta.pod
index 65cfb94..91b9682 100644
--- a/pod/perl5110delta.pod
+++ b/pod/perl5110delta.pod
@@ -23,6 +23,15 @@ developement releases.
=head1 Selected Bug Fixes
+=over 4
+
+=item C<-I> on shebang line now adds directories in front of @INC
+
+as documented, and as does C<-I> when specified on the command-line.
+(Renée BÀcker)
+
+=back
+
=head1 New or Changed Diagnostics
=head1 Changed Internals
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index 58e866d..3ce60d0 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -1959,7 +1959,7 @@ sanctioned for use in extensions) begins like this:
void
Perl_sv_setiv(pTHX_ SV* dsv, IV num)
-C<pTHX_> is one of a number of macros (in perl.h) that hide the
+C<pTHX_> is one of a number of macros (in F<perl.h>) that hide the
details of the interpreter's context. THX stands for "thread", "this",
or "thingy", as the case may be. (And no, George Lucas is not involved. :-)
The first character could be 'p' for a B<p>rototype, 'a' for B<a>rgument,
@@ -2028,7 +2028,7 @@ built with PERL_IMPLICIT_CONTEXT enabled.
There are three ways to do this. First, the easy but inefficient way,
which is also the default, in order to maintain source compatibility
-with extensions: whenever XSUB.h is #included, it redefines the aTHX
+with extensions: whenever F<XSUB.h> is #included, it redefines the aTHX
and aTHX_ macros to call a function that will return the context.
Thus, something like:
@@ -2165,7 +2165,7 @@ This allows the ability to provide an extra pointer (called the "host"
environment) for all the system calls. This makes it possible for
all the system stuff to maintain their own state, broken down into
seven C structures. These are thin wrappers around the usual system
-calls (see win32/perllib.c) for the default perl executable, but for a
+calls (see F<win32/perllib.c>) for the default perl executable, but for a
more ambitious host (like the one that would do fork() emulation) all
the extra work needed to pretend that different interpreters are
actually different "processes", would be done here.
diff --git a/t/run/switchI.t b/t/run/switchI.t
index 41192cd..cfb0f6e 100644
--- a/t/run/switchI.t
+++ b/t/run/switchI.t
@@ -15,11 +15,11 @@ my $Is_VMS = $^O eq 'VMS';
my $lib;
$lib = $Is_MacOS ? ':Bla:' : 'Bla';
-ok(grep { $_ eq $lib } @INC);
+ok(grep { $_ eq $lib } @INC[0..($#INC-1)]);
SKIP: {
skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
$lib = $Is_MacOS ? 'Foo::Bar:' : 'Foo::Bar';
- ok(grep { $_ eq $lib } @INC);
+ ok(grep { $_ eq $lib } @INC[0..($#INC-1)]);
}
$lib = $Is_MacOS ? ':Bla2:' : 'Bla2';
--
Perl5 Master Repository
<http://perl5.git.perl.org/perl.git/commitdiff/54ad55c59e2227f3197e56a9a85b1f78d0229ac7?hp=d4222de00860407a7c86f19fdb5531ac98b1b7ad>
- Log -----------------------------------------------------------------
commit 54ad55c59e2227f3197e56a9a85b1f78d0229ac7
Author: Rafael Garcia-Suarez <***@gmail.com>
Date: Fri Dec 26 00:24:20 2008 +0100
Add description of last commit in perldelta
(see ccb8f6a64f3dd06b4360bc27c194b28e6766a6ad)
M pod/perl5110delta.pod
commit ccb8f6a64f3dd06b4360bc27c194b28e6766a6ad
Author: Renee Baecker <***@smart-websolutions.de>
Date: Fri Dec 26 00:15:25 2008 +0100
[perl #6665] Different behavior using the -Idir option on the command line and inside a perl script
Adds the -Idir at the beginning of @INC.
(Plus a test by rgs -- check that -I does not add directories at the end
of the @INC array anymore)
M perl.c
M t/run/switchI.t
commit 0147cd53faa57ffcd05cb0455b952fbfbe63b0b2
Author: Matt Kraai <***@ftbfs.org>
Date: Thu Jul 3 14:04:44 2008 -0700
Use the F formatting codes for filenames in pod/perlguts.pod.
M pod/perlguts.pod
-----------------------------------------------------------------------
Summary of changes:
perl.c | 8 +++++---
pod/perl5110delta.pod | 9 +++++++++
pod/perlguts.pod | 6 +++---
t/run/switchI.t | 4 ++--
4 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/perl.c b/perl.c
index 021f35d..deb9d38 100644
--- a/perl.c
+++ b/perl.c
@@ -4873,7 +4873,8 @@ S_incpush_if_exists(pTHX_ SV *dir)
if (PerlLIO_stat(SvPVX_const(dir), &tmpstatbuf) >= 0 &&
S_ISDIR(tmpstatbuf.st_mode)) {
- av_push(GvAVn(PL_incgv), dir);
+ av_unshift( GvAVn( PL_incgv ), 1 );
+ av_store( GvAVn( PL_incgv ), 0, dir );
dir = newSV(0);
}
return dir;
@@ -5093,8 +5094,9 @@ S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep,
#endif
}
- /* finally push this lib directory on the end of @INC */
- av_push(GvAVn(PL_incgv), libdir);
+ /* finally add this lib directory at the beginning of @INC */
+ av_unshift( GvAVn( PL_incgv ), 1 );
+ av_store( GvAVn( PL_incgv ), 0, libdir );
}
if (subdir) {
assert (SvREFCNT(subdir) == 1);
diff --git a/pod/perl5110delta.pod b/pod/perl5110delta.pod
index 65cfb94..91b9682 100644
--- a/pod/perl5110delta.pod
+++ b/pod/perl5110delta.pod
@@ -23,6 +23,15 @@ developement releases.
=head1 Selected Bug Fixes
+=over 4
+
+=item C<-I> on shebang line now adds directories in front of @INC
+
+as documented, and as does C<-I> when specified on the command-line.
+(Renée BÀcker)
+
+=back
+
=head1 New or Changed Diagnostics
=head1 Changed Internals
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index 58e866d..3ce60d0 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -1959,7 +1959,7 @@ sanctioned for use in extensions) begins like this:
void
Perl_sv_setiv(pTHX_ SV* dsv, IV num)
-C<pTHX_> is one of a number of macros (in perl.h) that hide the
+C<pTHX_> is one of a number of macros (in F<perl.h>) that hide the
details of the interpreter's context. THX stands for "thread", "this",
or "thingy", as the case may be. (And no, George Lucas is not involved. :-)
The first character could be 'p' for a B<p>rototype, 'a' for B<a>rgument,
@@ -2028,7 +2028,7 @@ built with PERL_IMPLICIT_CONTEXT enabled.
There are three ways to do this. First, the easy but inefficient way,
which is also the default, in order to maintain source compatibility
-with extensions: whenever XSUB.h is #included, it redefines the aTHX
+with extensions: whenever F<XSUB.h> is #included, it redefines the aTHX
and aTHX_ macros to call a function that will return the context.
Thus, something like:
@@ -2165,7 +2165,7 @@ This allows the ability to provide an extra pointer (called the "host"
environment) for all the system calls. This makes it possible for
all the system stuff to maintain their own state, broken down into
seven C structures. These are thin wrappers around the usual system
-calls (see win32/perllib.c) for the default perl executable, but for a
+calls (see F<win32/perllib.c>) for the default perl executable, but for a
more ambitious host (like the one that would do fork() emulation) all
the extra work needed to pretend that different interpreters are
actually different "processes", would be done here.
diff --git a/t/run/switchI.t b/t/run/switchI.t
index 41192cd..cfb0f6e 100644
--- a/t/run/switchI.t
+++ b/t/run/switchI.t
@@ -15,11 +15,11 @@ my $Is_VMS = $^O eq 'VMS';
my $lib;
$lib = $Is_MacOS ? ':Bla:' : 'Bla';
-ok(grep { $_ eq $lib } @INC);
+ok(grep { $_ eq $lib } @INC[0..($#INC-1)]);
SKIP: {
skip 'Double colons not allowed in dir spec', 1 if $Is_VMS;
$lib = $Is_MacOS ? 'Foo::Bar:' : 'Foo::Bar';
- ok(grep { $_ eq $lib } @INC);
+ ok(grep { $_ eq $lib } @INC[0..($#INC-1)]);
}
$lib = $Is_MacOS ? ':Bla2:' : 'Bla2';
--
Perl5 Master Repository