local and our are completely unrelated.
That's not true. local is about aliasing package globals, and our creates a package global in the package where that declaration occurs (and a lexical alias to that in the current scope), so they are related: they both act upon slots in the symbol table of a package. So they are related.
$ perl -E 'package Foo; local our $bar; package main; say for keys %Fo +o::' bar
and
$ perl -E 'our $bar = "foo"; say "1: $bar"; package Foo; { local our $ +bar = "quux"; say "2: $bar"; }; say "3: $bar"; package main; say "4: +$bar"; say "Foo::$_" for keys %Foo::' 1: foo 2: quux 3: foo 4: foo Foo::bar
In reply to Re^2: local our?
by shmem
in thread local our?
by gam3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |