in reply to Re^2: how to declare a local *subname=sub{}?
in thread how to declare a local *subname=sub{}?

> Main Q is why or how might I declare asub, or is  *asub = sub{...} equivalent to  sub asub {}

Almost equivalent, the prior has a runtime effect the latter only compile time.

See perlmod for phases of execution and do some experiments checking the availability of subs.

But I'm repeating myself now. ...

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^4: how to declare a local *subname=sub{}?
by perl-diddler (Chaplain) on Oct 30, 2016 at 23:31 UTC
    Ok, got that... but why doesn't the 'lvalue' "asub" need to be declared under strict?
      You are accessing a global symbol of the stash

      you don't need to declare hash elements of an existing hash either, do you?

      update

      You seem to think that local is declaring variables.

      That's totally wrong! Please read documentation and provided links.

      meta:

      This whole discussion is too XY for my taste, I'm out now. :)

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!