parrotcode: testing namespaces | |
Contents | Language Implementations | Pipp |
t/php/namespace.t - testing namespaces
perl t/harness t/php/namespace.t
Working with namespaces.
package A { our $FOO = "FOO in A\n"; }
package A::B { our $FOO = "FOO in A::B\n"; }
package A { our $FOO; print $FOO; print $A::FOO; print $A::B::FOO; say(''); }
package A::B { our $FOO; print $FOO; print $A::FOO; print $A::B::FOO; say(''); }
|