]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/21-bad.t
Handle __PACKAGE__ as object name correctly
[perl/modules/indirect.git] / t / 21-bad.t
index fa2c322bda0254260f76e5372eef0f3c692064d4..0d3b48d96a3f81abe21a73e361595fc19e387381 100644 (file)
@@ -11,8 +11,8 @@ use warnings;
 
 my ($tests, $reports);
 BEGIN {
- $tests   = 82;
- $reports = 94;
+ $tests   = 84;
+ $reports = 96;
 }
 
 use Test::More tests => 3 * (4 * $tests + $reports) + 4;
@@ -491,3 +491,13 @@ meh { feh $x; 1; } new Hlagh, feh $y;
 $obj = "apple @{[new { feh $x; meh $y; 1 }]} pear"
 ----
 [ 'feh', '$x' ], [ 'meh', '$y' ], [ 'new', '{' ]
+####
+package __PACKAGE_;
+new __PACKAGE_;
+----
+[ 'new', '__PACKAGE_' ]
+####
+package __PACKAGE___;
+new __PACKAGE___;
+----
+[ 'new', '__PACKAGE___' ]