[perl.git] branch blead, updated. v5.22.0-129-gb6d5ddf

2015-06-16 Thread Tony Cook
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/b6d5ddf72d1067c498a7ed65623df9f2f8f8d749?hp=bace499647c542e44fa169173393f19316fe05b6

- Log -
commit b6d5ddf72d1067c498a7ed65623df9f2f8f8d749
Author: Tony Cook t...@develop-help.com
Date:   Wed Jun 17 10:55:19 2015 +1000

[perl #123264] explicitly document the return value of sysopen
---

Summary of changes:
 pod/perlfunc.pod | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index b2c8bb6..650ad0e 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -7957,6 +7957,8 @@ filehandle wanted; an undefined scalar will be suitably 
autovivified.  This
 function calls the underlying operating system's Iopen(2) function with the
 parameters FILENAME, MODE, and PERMS.
 
+Returns true on success and Cundef otherwise.
+
 The possible values and flag bits of the MODE parameter are
 system-dependent; they are available via the standard module CFcntl.  See
 the documentation of your operating system's Iopen(2) syscall to see

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.22.0-130-gb4929cb

2015-06-16 Thread Tony Cook
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/b4929cb48878718cd9a8f54a834db6353f8115ec?hp=b6d5ddf72d1067c498a7ed65623df9f2f8f8d749

- Log -
commit b4929cb48878718cd9a8f54a834db6353f8115ec
Author: Tony Cook t...@develop-help.com
Date:   Wed Jun 17 11:10:18 2015 +1000

[perl #125305] chdir() no longer behaves like chdir()
---

Summary of changes:
 pod/perldiag.pod | 10 --
 pp_sys.c |  5 +
 t/op/chdir.t | 30 ++
 3 files changed, 7 insertions(+), 38 deletions(-)

diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 47c23eb..0adabf5 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -6658,16 +6658,6 @@ one.  This doesn't make sense.  Perl will continue, 
assuming a Unicode
 happens to be ISO-8859-1 (Latin1) where this message is spurious and can
 be ignored.
 
-=item Use of chdir('') or chdir(undef) as chdir() deprecated
-
-(D deprecated) chdir() with no arguments is documented to change to
-$ENV{HOME} or $ENV{LOGDIR}.  chdir(undef) and chdir('') share this
-behavior, but that has been deprecated.  In future versions they
-will simply fail.
-
-Be careful to check that what you pass to chdir() is defined and not
-blank, else you might find yourself in your home directory.
-
 =item Use of /c modifier is meaningless in s///
 
 (W regexp) You used the /c modifier in a substitution.  The /c
diff --git a/pp_sys.c b/pp_sys.c
index beca14a..1c2ef9c 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3591,8 +3591,7 @@ PP(pp_chdir)
 else if (!(gv = MAYBE_DEREF_GV(sv)))
tmps = SvPV_nomg_const_nolen(sv);
 }
-
-if( !gv  (!tmps || !*tmps) ) {
+else {
HV * const table = GvHVn(PL_envgv);
SV **svp;
 
@@ -3603,8 +3602,6 @@ PP(pp_chdir)
 #endif
)
 {
-if( MAXARG == 1 )
-deprecate(chdir('') or chdir(undef) as chdir());
 tmps = SvPV_nolen_const(*svp);
 }
 else {
diff --git a/t/op/chdir.t b/t/op/chdir.t
index 813b0ed..84159fe 100644
--- a/t/op/chdir.t
+++ b/t/op/chdir.t
@@ -10,10 +10,11 @@ BEGIN {
 # possibilities into @INC.
 unshift @INC, qw(t . lib ../lib);
 require ./test.pl;
-plan(tests = 48);
+plan(tests = 42);
 }
 
 use Config;
+use Errno qw(ENOENT);
 
 my $IsVMS   = $^O eq 'VMS';
 
@@ -150,29 +151,10 @@ sub check_env {
 
 my $warning = '';
 local $SIG{__WARN__} = sub { $warning .= join '', @_ };
-
-
-# Check the deprecated chdir(undef) feature.
-#line 64
-ok( chdir(undef),   chdir(undef) w/ only \$ENV{$key} set );
-is( abs_path, $ENV{$key},   '  abs_path() agrees' );
-is( $warning,  WARNING,   '  got uninit  deprecation warning' );
-Use of uninitialized value in chdir at $0 line 64.
-Use of chdir('') or chdir(undef) as chdir() is deprecated at $0 line 64.
-WARNING
-
-chdir($Cwd);
-
-# Ditto chdir('').
-$warning = '';
-#line 76
-ok( chdir(''),  chdir('') w/ only \$ENV{$key} set );
-is( abs_path, $ENV{$key},   '  abs_path() agrees' );
-is( $warning,  WARNING,   '  got deprecation warning' );
-Use of chdir('') or chdir(undef) as chdir() is deprecated at $0 line 76.
-WARNING
-
-chdir($Cwd);
+$! = 0;
+ok(!chdir(''), chdir('') no longer implied chdir());
+is($!+0, ENOENT, 'check $! set appropriately');
+is($warning, '', 'should no longer warn about deprecation');
 }
 }
 

--
Perl5 Master Repository


[perl.git] branch blead, updated. v5.22.0-128-gbace499

2015-06-16 Thread Rafael Garcia-Suarez
In perl.git, the branch blead has been updated

http://perl5.git.perl.org/perl.git/commitdiff/bace499647c542e44fa169173393f19316fe05b6?hp=23e51b95a8db32227346e84c1c77148c98aba157

- Log -
commit bace499647c542e44fa169173393f19316fe05b6
Author: Rafael Garcia-Suarez r...@consttype.org
Date:   Tue Jun 16 12:21:04 2015 +0200

Perl example style nit in docs for sort()

Declare both arrays, no need to clear them.
---

Summary of changes:
 pod/perlfunc.pod | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index ba77638..b2c8bb6 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -6824,7 +6824,7 @@ Examples:
 # same thing, but much more efficiently;
 # we'll build auxiliary indices instead
 # for speed
-my @nums = @caps = ();
+my (@nums, @caps);
 for (@old) {
 push @nums, ( /=(\d+)/ ? $1 : undef );
 push @caps, fc($_);

--
Perl5 Master Repository