develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #117087] forbid empty parts in package names

Thread Previous | Thread Next
Tony Cook via RT
August 5, 2013 02:03
[perl #117087] forbid empty parts in package names
Message ID:
On Sun Aug 04 18:59:28 2013, tonyc wrote:
> On Wed Jul 31 22:29:40 2013, tonyc wrote:
> > I've attached the rebased patches, but the final patch is obviously
> > incomplete.
> Brian updated his branch on github, I've attached the new patch series.
> Tony

The only questionable part to me (besides some whitespace issues), is
this modification to S_scan_word():

@@ -9360,6 +9396,8 @@ S_scan_word(pTHX_ char *s, char *dest, STRLEN
destlen, int allow_package, STRLEN
     parse_ident(&s, &d, e, allow_package, is_utf8);
     *d = '\0';
     *slp = d - dest;
+    if ( allow_package && *slp && *slp >= 4 )
+            deprecate_empty_packages(dest);
     return s;
I know parsers (and especially perl's parser) tend to be messy, but I'm
not sure that check belongs in scan_word - changing it from "scan a
word" to "scan a word and optionally warn".

Unless someone else speaks up I plan to apply it as is (with whitespace


via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About