[perl.git] branch sprout/nonelem created. v5.27.8-12-g480bf6d3f3

2018-01-21 Thread Father Chrysostomos
In perl.git, the branch sprout/nonelem has been created



at  480bf6d3f34da50d2e908a36e7ba574a2857b20e (commit)

- Log -
commit 480bf6d3f34da50d2e908a36e7ba574a2857b20e
Author: Father Chrysostomos 
Date:   Sun Jan 21 21:55:00 2018 -0800

‘Nonelems’ for pushing sparse array on the stack

To avoid having to create deferred elements every time a sparse array
is pushed on to the stack, store a magic scalar in the array itself,
which av_exists and refto recognise as not existing.

This means there is only a one-time cost for putting such arrays on
the stack.

It also means that deferred elements that live long enough don’t
start pointing to the wrong array entry if the array gets shifted (or
unshifted/spliced) in the mean time.  Instead, the scalar is already
in the array, so it cannot lose its place.  This fix only applies
when the array as a whole is pushed on to the stack, but it could be
extended in future commits to apply to other places where we currently
use deferred elements.

---

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-12-gb404a7f588

2018-01-21 Thread Karl Williamson
In perl.git, the branch blead has been updated



- Log -
commit b404a7f5880f54fb0673d325408618ab43074309
Author: Karl Williamson 
Date:   Sun Jan 21 17:55:23 2018 -0700

PATCH: [perl #132750] Silence uninit warning

I inspected the code, and there is no problem here; it's a compiler
mistake.  Nevertheless, smply initializing the variable silences it.

---

Summary of changes:
 doop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doop.c b/doop.c
index 14b96ed8e0..7cc227faac 100644
--- a/doop.c
+++ b/doop.c
@@ -1018,7 +1018,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
 STRLEN rightlen;
 const char *lc;
 const char *rc;
-STRLEN len;
+STRLEN len = 0;
 STRLEN lensave;
 const char *lsave;
 const char *rsave;

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-11-g0f3591f944

2018-01-21 Thread Father Chrysostomos
In perl.git, the branch blead has been updated



- Log -
commit 0f3591f94499f7771d7a8e07afb6776a93fc5f9f
Author: Father Chrysostomos 
Date:   Sun Jan 21 16:19:56 2018 -0800

Follow-up to fd77b29b3be4

As Zefram pointed out, I left in a piece of code that caused one
branch to continue to behave as before.  The change was ineffective
and the tests happened to be written in such a way as to take the
other branch.

---

Summary of changes:
 pp_hot.c |  2 --
 t/op/array.t | 18 +-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/pp_hot.c b/pp_hot.c
index 1bc453a457..1b9fb9427a 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1175,8 +1175,6 @@ S_pushav(pTHX_ AV* const av)
 PADOFFSET i;
 for (i=0; i < (PADOFFSET)maxarg; i++) {
 SV *sv = AvARRAY(av)[i];
-   if (!LIKELY(sv))
-   AvARRAY(av)[i] = sv = newSV(0);
SP[i+1] = LIKELY(sv)
? sv
: UNLIKELY(PL_op->op_flags & OPf_MOD)
diff --git a/t/op/array.t b/t/op/array.t
index 9d0bfad4ef..aa595327bc 100644
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -6,7 +6,7 @@ BEGIN {
 set_up_inc('.', '../lib');
 }
 
-plan (185);
+plan (188);
 
 #
 # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
@@ -623,6 +623,22 @@ $#a = -1; $#a++;
'map {} @a does not vivify elements';
 $#a = -1;
 {local $a[3] = 12; my @foo=@a};
+is @a, 0,'unwinding localization of elem past end of array shrinks it';
+}
+{
+# Again, but with a non-magical array ($#a makes it magical)
+my @a = 1;
+delete $a[0];
+my @b = @a;
+ok !exists $a[0], 'copying an array via = does not vivify elements';
+delete $a[0];
+@a[1..5] = 1..5;
+my $count;
+my @existing_elements = map { exists $a[$count++] ? $_ : () } @a;
+is join(",", @existing_elements), "1,2,3,4,5",
+   'map {} @a does not vivify elements';
+@a = ();
+{local $a[3] = 12; my @foo=@a};
 is @a, 0, 'unwinding localization of elem past end of array shrinks it'
 }
 

-- 
Perl5 Master Repository


[perl.git] branch blead updated. v5.27.8-10-gef7498d2b6

2018-01-21 Thread Aaron Crane
In perl.git, the branch blead has been updated



- Log -
commit ef7498d2b69936a5c6476ecf1950066f638b2dac
Author: Aaron Crane 
Date:   Sun Jan 21 20:28:52 2018 +

perlpolicy: update policy in accordance with recent moderator discussions

Substantive changes:

Firstly, as promised earlier, we have clarified that, by forwarding a
message to the list, the sender takes responsibility for the content of the
message in question.

Secondly, we have changed the policy regarding ban lengths. Previously,
third or subsequent instances of unacceptable behaviour resulted in a ban
twice the length of the person's previous ban. Under the new policy, a third
instance of unacceptable behaviour results in a further warning, and a
fourth instance results in a ban of indefinite length.

Our rationale is that temporary bans are for the offender: to give them the
opportunity to change their behaviour in a way that aligns with our
community expectations. However, if the person in question fails to take
advantage of that opportunity, our focus must shift to the community: we aim
to protect other list members from having to bear the burden of unacceptable
behaviour.

Finally, we welcome Karen Etheridge and Todd Rinaldo as additional
moderators. I'd like to offer both Karen and Todd my personal thanks for
agreeing to serve.

---

Summary of changes:
 pod/perlpolicy.pod | 46 --
 1 file changed, 32 insertions(+), 14 deletions(-)

diff --git a/pod/perlpolicy.pod b/pod/perlpolicy.pod
index 6c57238eac..8a4da41939 100644
--- a/pod/perlpolicy.pod
+++ b/pod/perlpolicy.pod
@@ -545,8 +545,9 @@ it doesn't need to fully describe how all old versions used 
to work.
 =head1 STANDARDS OF CONDUCT
 
 The official forum for the development of perl is the perl5-porters mailing
-list, mentioned above, and its bugtracker at rt.perl.org.  All participants in
-discussion there are expected to adhere to a standard of conduct.
+list, mentioned above, and its bugtracker at rt.perl.org.  Posting to the
+list and the bugtracker is not a right: all participants in discussion are
+expected to adhere to a standard of conduct.
 
 =over 4
 
@@ -554,15 +555,18 @@ discussion there are expected to adhere to a standard of 
conduct.
 
 Always be civil.
 
-=item * 
+=item *
 
 Heed the moderators.
 
 =back
 
-Civility is simple:  stick to the facts while avoiding demeaning remarks and
-sarcasm.  It is not enough to be factual.  You must also be civil.  Responding
-in kind to incivility is not acceptable.
+Civility is simple: stick to the facts while avoiding demeaning remarks,
+belittling other individuals, sarcasm, or a presumption of bad faith. It is
+not enough to be factual.  You must also be civil.  Responding in kind to
+incivility is not acceptable.  If you relay otherwise-unposted comments to
+the list from a third party, you take responsibility for the content of
+those comments, and you must therefore ensure that they are civil.
 
 While civility is required, kindness is encouraged; if you have any doubt about
 whether you are being civil, simply ask yourself, "Am I being kind?" and aspire
@@ -571,16 +575,30 @@ to that.
 If the list moderators tell you that you are not being civil, carefully
 consider how your words have appeared before responding in any way.  Were they
 kind?  You may protest, but repeated protest in the face of a repeatedly
-reaffirmed decision is not acceptable.
-
-Unacceptable behavior will result in a public and clearly identified warning.
-Repeated unacceptable behavior will result in removal from the mailing list and
-revocation of rights to update rt.perl.org.  The first removal is for one
-month.  Subsequent removals will double in length.  After six months with no
-warning, a user's ban length is reset.  Removals, like warnings, are public.
+reaffirmed decision is not acceptable.  Repeatedly protesting about the
+moderators' decisions regarding a third party is also unacceptable, as is
+continuing to initiate off-list contact with the moderators about their
+decisions.
+
+Unacceptable behavior will result in a public and clearly identified
+warning.  A second instance of unacceptable behavior from the same
+individual will result in removal from the mailing list and rt.perl.org,
+for a period of one calendar month.  The rationale for this is to
+provide an opportunity for the person to change the way they act.
+
+After the time-limited ban has been lifted, a third instance of
+unacceptable behavior will result in a further public warning.  A fourth
+or subsequent instance will result in an indefinite ban.  The rationale
+is that, in

[perl.git] branch blead updated. v5.27.8-9-g1d60dc3fde

2018-01-21 Thread Craig A. Berry
In perl.git, the branch blead has been updated



- Log -
commit 1d60dc3fde1056479bb0133084c4a22c37869c37
Author: Craig A. Berry 
Date:   Sun Jan 21 12:47:45 2018 -0600

Make VMS CRTL features work for embedders.

The various run-time features of the CRTL that Perl uses were being
fetched at image activation time and stored in static variables
for later reference.  That works ok when Perl is the program, but
not when Perl is the library since in the latter case attempts by
an embedder to alter the feature settings before invoking Perl were
being ignored.

So store the feature index, not its value, and use that index to
get the current value via decc$feature_get_value whenever we need
it.  This means function calls rather than data references, but
there is no measurable impact on performance.

Also fix a bug in the handling of the feature to disable the POSIX
root; we were saying we were disabling it but weren't really doing
so because its current value cannot be set for some reason (only
its default value).  Since the feature only affects the conversion
of filenames between Unix and VMS format and we don't use the CRTL's
functions for that, it's unlikely this bug ever caused trouble.

---

Summary of changes:
 pod/perldelta.pod |   6 +
 vms/vms.c | 331 --
 2 files changed, 151 insertions(+), 186 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 265a96fece..1582af6808 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -307,6 +307,12 @@ source tree.
 
 XXX
 
+=item VMS
+
+CRTL features can now be set by embedders before invoking Perl by using the
+C and C functions.  Previously any 
attempt
+to set features after image initialization were ignored.
+
 =back
 
 =head2 Discontinued Platforms
diff --git a/vms/vms.c b/vms/vms.c
index 7698fac6ed..447b5263d1 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -213,19 +213,38 @@ static bool will_taint = FALSE;  /* tainting active, but 
no PL_curinterp yet */
 /* munching */ 
 static int no_translate_barewords;
 
-/* DECC Features that may need to affect how Perl interprets
- * displays filename information
+/* DECC feature indexes.  We grab the indexes at start-up
+ * time for later use with decc$feature_get_value.
  */
-static int decc_disable_to_vms_logname_translation = 1;
-static int decc_disable_posix_root = 1;
-int decc_efs_case_preserve = 0;
-static int decc_efs_charset = 0;
-static int decc_efs_charset_index = -1;
-static int decc_filename_unix_no_version = 0;
-static int decc_filename_unix_only = 0;
-int decc_filename_unix_report = 0;
-int decc_posix_compliant_pathnames = 0;
-int decc_readdir_dropdotnotype = 0;
+static int disable_to_vms_logname_translation_index = -1;
+static int disable_posix_root_index = -1;
+static int efs_case_preserve_index = -1;
+static int efs_charset_index = -1;
+static int filename_unix_no_version_index = -1;
+static int filename_unix_only_index = -1;
+static int filename_unix_report_index = -1;
+static int posix_compliant_pathnames_index = -1;
+static int readdir_dropdotnotype_index = -1;
+
+#define DECC_DISABLE_TO_VMS_LOGNAME_TRANSLATION \
+
(decc$feature_get_value(disable_to_vms_logname_translation_index,__FEATURE_MODE_CURVAL)>0)
+#define DECC_DISABLE_POSIX_ROOT  \
+(decc$feature_get_value(disable_posix_root_index,__FEATURE_MODE_CURVAL)>0)
+#define DECC_EFS_CASE_PRESERVE  \
+(decc$feature_get_value(efs_case_preserve_index,__FEATURE_MODE_CURVAL)>0)
+#define DECC_EFS_CHARSET  \
+(decc$feature_get_value(efs_charset_index,__FEATURE_MODE_CURVAL)>0)
+#define DECC_FILENAME_UNIX_NO_VERSION  \
+
(decc$feature_get_value(filename_unix_no_version_index,__FEATURE_MODE_CURVAL)>0)
+#define DECC_FILENAME_UNIX_ONLY  \
+(decc$feature_get_value(filename_unix_only_index,__FEATURE_MODE_CURVAL)>0)
+#define DECC_FILENAME_UNIX_REPORT  \
+
(decc$feature_get_value(filename_unix_report_index,__FEATURE_MODE_CURVAL)>0)
+#define DECC_POSIX_COMPLIANT_PATHNAMES   \
+
(decc$feature_get_value(posix_compliant_pathnames_index,__FEATURE_MODE_CURVAL)>0)
+#define DECC_READDIR_DROPDOTNOTYPE  \
+
(decc$feature_get_value(readdir_dropdotnotype_index,__FEATURE_MODE_CURVAL)>0)
+
 static int vms_process_case_tolerant = 1;
 int vms_vtf7_filenames = 0;
 int gnv_unix_shell = 0;
@@ -292,7 +311,7 @@ is_unix_filespec(const char *path)
else {
 
/* If the user wants UNIX files, "." needs to be treated as in UNIX 
*/
-   if (decc_filename_unix_report || decc_filename_unix_only) {
+   if (DECC_FILENAME_UNIX_REPORT || DECC_FILENAME_UNIX_ONLY) {
  if (strEQ(path,"."))
ret