Skip to content

perlver doesn't notice postderef unless it's explicitly called out #33

@pryrt

Description

@pryrt

After reading this perlmonks post, I did some investigating, and narrowed it down to 3 separate bugs or feature requests, which I'm raising as three separate issues.

For postfix dereferencing, 'use feature qw(postderef);' was required when it was new in v5.20, but since v5.24, you are not required to explicitly use that feature any more: it is on and works by default.

Hence, in v5.24 or newer, the following is valid code, but if you tried to run it before v5.24, it would not work:

code: implicit_postderef.pl

#!/usr/bin/perl

use warnings;
use strict;

$_ = [1];
my @a = $_->@*;
print "@a\n";

Running perlver implicit_postderef.pl yields:

   ----------------------------------------------------
 | file                  | explicit | syntax | external |
 | ---------------------------------------------------- |
 | implicit_postderef.pl | ~        | v5.6.0 | n/a      |
 | ---------------------------------------------------- |
 | Minimum explicit version : ~                             |
 | Minimum syntax version   : v5.6.0                        |
 | Minimum version of perl  : v5.6.0                        |
   ----------------------------------------------------

I would expect it to report that the syntax requires v5.24.0 (or maybe just v5.20.0, since use feature qw(postderef); will allow that syntax to work back to v5.20).

(I did confirm that an explicit 'use feature qw(postderef);' correctly shows v5.20.0 as the minimum version required.)

(verified with perlver v1.40 on Perl 5.32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions