in reply to Re^3: Reading session data
in thread Reading session data
G'day hippo,
"Perhaps someone who likes/uses postfix deref can explain where the compilation error comes from and how to fix it."
The problem revolves around the version of Perl being used, the feature bundle loaded, and additional features requested. Here's some examples:
$ perl -E 'say $^V; my $x = "xyz"; my $r = \$x; say "PFDR: $r->$*";' v5.36.0 PFDR: xyz
$ perl -e 'print $^V; my $x = "xyz"; my $r = \$x; print "PFDR: $r->$*" +;' $* is no longer supported as of Perl 5.30 at -e line 1.
$ perl -e 'use v5.22; say $^V; my $x = "xyz"; my $r = \$x; say "PFDR: +$r->$*";' $* is no longer supported as of Perl 5.30 at -e line 1.
$ perl -e 'use v5.22; use feature "postderef"; say $^V; my $x = "xyz"; + my $r = \$x; say "PFDR: $r->$*";' $* is no longer supported as of Perl 5.30 at -e line 1.
$ perl -e 'use v5.22; use feature "postderef"; say $^V; my $x = "xyz"; + my $r = \$x; my $y = $r->$*; say "PFDR: $y";' v5.36.0 PFDR: xyz
$ perl -e 'use v5.22; use feature "postderef_qq"; say $^V; my $x = "xy +z"; my $r = \$x; say "PFDR: $r->$*";' v5.36.0 PFDR: xyz
$ perl -e 'use v5.24; say $^V; my $x = "xyz"; my $r = \$x; say "PFDR: +$r->$*";' v5.36.0 PFDR: xyz
I couldn't see it specifically documented anywhere but 'use feature "postderef_qq";'
seems to imply 'use feature "postderef";'.
This is borne out by my own tests (in particular, see the "v5.22" tests above)
and documentation of feature bundles that include postderef_qq
do not also include postderef.
[I have a niggling feeling that I did see such documentation a long time ago.
If someone locates it, please share. Thankyou.]
Some relevant documentation links (in no particular order):
— Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Reading session data
by hippo (Archbishop) on Jul 01, 2023 at 14:29 UTC |