Lines Matching full:foo*
97 local *main::foo = *main::bar;
98 local $main::{foo} = $main::{bar};
101 and C<local $main::foo = $main::bar>. The former is accessing the hash
103 simply assigning scalar C<$bar> in package C<main> to scalar C<$foo> of
126 *foo = *bar;
127 *foo = \$bar;
129 C<*foo = *bar> makes the typeglobs themselves synonymous while
130 C<*foo = \$bar> makes the SCALAR portions of two distinct typeglobs
134 *foo = \$bar; # Make $foo an alias for $bar
138 print $foo; # Prints '1'!
141 Would print '1', because C<$foo> holds a reference to the I<original>
144 typeglob, you can use C<*foo = *bar> to create an alias which can be
146 C<@foo> and C<@bar>, etc.)
153 @EXPORT = qw($FOO); # Usual form, can't be localized
154 @EXPORT = qw(*FOO); # Can be localized
157 (C<$Package::FOO>) where you need a local value, or by overriding it
158 by saying C<*FOO = *Package::FOO> in your script.
192 You can say C<*foo{PACKAGE}> and C<*foo{NAME}> to find out what name and
193 package the *foo symbol table entry comes from. This may be useful
200 identify_typeglob *foo;
205 You gave me main::foo
208 The C<*foo{THING}> notation can also be used to obtain references to the
209 individual elements of *foo. See L<perlref>.
217 sub Some_package::foo { ... } # &foo defined in Some_package
221 BEGIN { *Some_package::foo = sub { ... } }
227 sub foo { ... }
239 sub Some_package::foo {
243 Some_package::foo();