no multidimensional; no stringification; no bareword::filehandles #175

daxim opened this Issue Jan 28, 2011 · 5 comments

2 participants


Same idea as the pragmas autovivification, indirect.

LeoNerd is writing stringification, but not done yet.


multidimensional looks solid. I've never been bitten that typo before, but if it doesn't hurt performance I don't see why not.

Turning reference stringification I'm wary of because I use it for debugging, but I'll go with it as 999 times out of 1000 it's a mistake and should produce an error. As long as it's solid and doesn't hurt normal stringification performance.

This going in will cause us to jump to 3.0, because it will make existing perl5i::2 code break. Not a big deal, but I'd like to spool up some more 3.0 changes.


no bareword::filehandles


I like no bareword::filehandles. I've been bitten by them many times, forgetting to close a file I've written to and it not getting flushed or worse, holding an exclusive lock on Windows.

I approve no bareword::filehandles and no multidimensional.

no stringification needs more discussion.

@doherty doherty added a commit to doherty/perl5i that referenced this issue Jun 6, 2011
@doherty doherty Add 'no bareword::filehandles'
This disallows the use of bareword filehandles:

    open IN, '<', $file; #dies with:
        # Can't use string ("IN") as a symbol ref while "strict refs" in use

Partially fixes #175

I've split multidimensional into #202


Discussion about stringification pragma:

<daxim> LeoNerd, thread; raises the point that one would need a safe way to stringify a reference, e.g. a function ref2string or similar
<daxim> would you say it makes sense to add this to the pragmatic module "stringification"? also, is it possible to cut a stable release so perl5i may depend on it?
<LeoNerd> Hah... stable..?
<LeoNerd> Hardly.. the module isn't very complete or useful currently..
<LeoNerd> I semi-stopped because it basically invovles replacing every single perl core op in a really stupid way
<LeoNerd> I wrote it to demonstrate the usefulness of having such a pragma, such that maybe p5p core might provide a nice way to hook into sv_2pv_flags
<LeoNerd> Its current implementation is horrible though
<LeoNerd> If you want it though, please go make some noise. ideally at p5p.
<LeoNerd> list or channel

<daxim> thought experiment: if a p5p-er adds the necessary thing now, it gets released as perl 5.16; is there a way to make this work with 5.10+, too?
<LeoNerd> Well... stringification.xs can be written with two implementations, sure.
<LeoNerd> A proper "actually-works" for 5.16+, and a "sortof halfworks but I'll kill it one day" for <5.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment