Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXPERIMENT] Declared references #15458

Open
p5pRT opened this issue Jul 17, 2016 · 3 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Jul 17, 2016

Migrated from rt.perl.org#128654 (status was 'open')

Searchable as RT128654$

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 17, 2016

From @cpansprout

The declared_refs feature, which is about to be merged into blead, gives Perl 5.26.0 experimental support for declaring a reference to a variable​:

  my \$x; # equivalent to \my $x

It is intended mainly for use in conjunction with refaliasing​:

  my \$x = \$y;

--

Father Chrysostomos

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 15, 2019

From @tonycoz

On Sun, 17 Jul 2016 11​:26​:25 -0700, sprout wrote​:

The declared_refs feature, which is about to be merged into blead,
gives Perl 5.26.0 experimental support for declaring a reference to a
variable​:

my \$x; # equivalent to \my $x

It is intended mainly for use in conjunction with refaliasing​:

my \$x = \$y;

The documentation​:

Beginning in v5.26.0, the referencing operator can come after C<my>,
C<state>, C<our>, or C<local>. This syntax must be enabled with C<use
feature 'declared_refs'>. It is experimental, and will warn by default
unless C<no warnings 'experimental​::refaliasing'> is in effect.

implies you can do​:

  local \&foo = \&bar;

which you can't.

Of course, the above is equivalent to​:

  local *foo = \&bar;

Tony

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 15, 2019

The RT System itself - Status changed from 'new' to 'open'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.