Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the mixin CPAN distribution.

Report information
The Basics
Id: 40495
Status: resolved
Priority: 0/
Queue: mixin

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.06
Fixed in: (no value)



Subject: constants do not work anymore with mixin.pm under 5.10.0
Hi Schwern, it seems that you discovered the problem yesterday, too. I find your p5p posting after writing a test exposing the problem. The patch with the additional test is attached, maybe you want to use it. Regards, Slaven
Subject: mixin-constant.patch
# # # To apply this patch: # STEP 1: Chdir to the source directory. # STEP 2: Run the 'applypatch' program with this patch file as input. # # If you do not have 'applypatch', it is part of the 'makepatch' package # that you can fetch from the Comprehensive Perl Archive Network: # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz # In the above URL, 'x' should be 2 or higher. # # To apply this patch without the use of 'applypatch': # STEP 1: Chdir to the source directory. # If you have a decent Bourne-type shell: # STEP 2: Run the shell with this file as input. # If you don't have such a shell, you may need to manually create # the files as shown below. # STEP 3: Run the 'patch' program with this file as input. # # These are the commands needed to create/delete files/directories: # touch 't/constant.t' chmod 0775 't/constant.t' # # This command terminates the shell and need not be executed manually. exit # #### End of Preamble #### #### Patch data follows #### diff -up 'mixin-0.06-hg6Hnk/MANIFEST' 'new.mixin-0.06/MANIFEST' Index: ./MANIFEST --- ./MANIFEST Wed Apr 18 19:09:33 2007 +++ ./MANIFEST Wed Oct 29 12:35:13 2008 @@ -9,6 +9,7 @@ t/lib/Dog/Hamish.pm t/lib/Test/Builder.pm t/lib/Test/More.pm t/lib/Test/Simple.pm +t/constant.t t/mixin.t t/SUPER.t t/universal.t diff -up /dev/null 'new.mixin-0.06/t/constant.t' Index: ./t/constant.t --- ./t/constant.t Thu Jan 1 01:00:00 1970 +++ ./t/constant.t Wed Oct 29 12:37:21 2008 @@ -0,0 +1,20 @@ +use strict; +use Test::More; + +plan tests => 2; + +package A; +use mixin::with 'Base'; +use constant FOO => "Bar"; + +package Base; +sub new { bless {}, shift } + +package MixinUser; +use base qw(Base); +use mixin qw(A); + +package main; + +pass("Mixins work with classes using constants"); +is(MixinUser->new->FOO, "Bar", "Expected constant value"); #### End of Patch data #### #### ApplyPatch data follows #### # Data version : 1.0 # Date generated : Wed Oct 29 12:46:38 2008 # Generated by : makepatch 2.00_12* # Recurse directories : Yes # Excluded files : (\A|/).*\~\Z # (\A|/).*\.a\Z # (\A|/).*\.bak\Z # (\A|/).*\.BAK\Z # (\A|/).*\.elc\Z # (\A|/).*\.exe\Z # (\A|/).*\.gz\Z # (\A|/).*\.ln\Z # (\A|/).*\.o\Z # (\A|/).*\.obj\Z # (\A|/).*\.olb\Z # (\A|/).*\.old\Z # (\A|/).*\.orig\Z # (\A|/).*\.rej\Z # (\A|/).*\.so\Z # (\A|/).*\.Z\Z # (\A|/)\.del\-.*\Z # (\A|/)\.make\.state\Z # (\A|/)\.nse_depinfo\Z # (\A|/)core\Z # (\A|/)tags\Z # (\A|/)TAGS\Z # p 'MANIFEST' 382 1225280113 0100644 # c 't/constant.t' 0 1225280241 0100775 #### End of ApplyPatch data #### #### End of Patch kit [created: Wed Oct 29 12:46:38 2008] #### #### Patch checksum: 72 2132 4639 #### #### Checksum: 102 3137 23801 ####
Weird, they were showing up as scalar refs in the symbol table. Probably some optimization. Fixed.