5.10 is somewhat unhappy with alter_superclass
Jesse Vincent <[email protected]> Sun, 1 Jun 2008 19:08:36 -0400
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--===============1837281297==
Content-Type: multipart/signed; protocol="application/pgp-signature";
micalg=pgp-sha1; boundary="Apple-Mail-5--21200862"
Content-Transfer-Encoding: 7bit
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-5--21200862
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
While testing out RT 3.8 on 5.10, we ran into a mysterious segfault.
We eventually tracked it down to this: In 5.10, if you replace an
entry in @INC things sometimes appear to fall apart.
Mason uses this pattern in HTML::Mason::Request::alter_superclass.
Working on a copy of the list and replacing it later makes RT start
passing tests again.
--- /old/HTML/Mason/Request.pm 2008-02-20 13:10:13.000000000 -0500
+++ /new/HTML/Mason/Request.pm 2008-06-01 19:02:03.000000000 -0400
@@ -351,7 +351,8 @@
my $isa_ref;
{
no strict 'refs';
- $isa_ref = \@{"$class\::ISA"};
+ my @entries = @{$class."::ISA"};
+ $isa_ref = \@entries;
}
# handles multiple inheritance properly and preserve
@@ -365,13 +366,16 @@
if ( $old_super ne $new_super )
{
$isa_ref->[$x] = $new_super;
-
- $class->valid_params( %{ $class->valid_params } );
}
-
last;
}
+ }
+
+ {
+ no strict 'refs';
+ @{$class."::ISA"} = @$isa_ref;
}
+ $class->valid_params( %{ $class->valid_params } );
}
sub exec {
sh-3.2#
--Apple-Mail-5--21200862
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iD8DBQFIQyv0Ei9d9xCOQEYRAs/yAJ4wff5uUuTCnsLNSBq7QhcQTR3HkQCeNecS
dfMwVCXogiM8mcVndIwqIQM=
=SweQ
-----END PGP SIGNATURE-----
--Apple-Mail-5--21200862--
--===============1837281297==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--===============1837281297==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Mason-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-devel
--===============1837281297==--