use strict; use warnings; use 5.010; { package Foo; our $bar; } { if (exists $::{'Foo::'}{bar}) { say "There's a Foo::bar with some sigil"; } if (exists $::{'Foo::'}{baz}) { say "There's a Foo::baz with some sigil"; } }
(Update: added code)
In reply to Re: How to access globals in arbitrary classes, without using soft ref?
by moritz
in thread How to access globals in arbitrary classes, without using soft ref?
by llancet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |