This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Constants in 5.10 will sometimes show up as scalar refs in the symbol…
… table. Probably some optimization. rt.cpan.org 40495
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/perl -w | ||
|
||
# 5.10.0 changed the way constants are represented in the symbol table. | ||
|
||
use strict; | ||
use Test::More tests => 2; | ||
|
||
{ | ||
package A; | ||
use mixin::with 'Top'; | ||
use constant FOO => "Bar"; | ||
} | ||
|
||
{ | ||
package Top; | ||
sub new { bless {}, shift } | ||
} | ||
|
||
{ | ||
package MixinUser; | ||
use base qw(Top); | ||
use mixin qw(A); | ||
} | ||
|
||
pass("Mixins work with classes using constants"); | ||
is(MixinUser->new->FOO, "Bar", "Expected constant value"); |