Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use packages when we talk about packages
  • Loading branch information
FROGGS committed Apr 1, 2013
1 parent 03d527f commit 75c8a16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions S04-declarations/our.t
Expand Up @@ -49,20 +49,20 @@ our $c = 42; #OK not used

# check that our-scoped variables really belong to the package
{
class D1 {
package D1 {
our $d1 = 7;
is($d1, 7, "we can of course see the variable from its own package");

class D2 {
package D2 {
our $d2 = 8;
{
our $d3 = 9;
}
{
is($d3, 9, "variables are seen within other lexical child blocks");

class D3 {
is($d3, 9, " ... and from within child classes");
package D3 {
is($d3, 9, " ... and from within child packages");
}
}
is($d3, 9, "variables leak from lexical blocks");
Expand Down

0 comments on commit 75c8a16

Please sign in to comment.