New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bleadperl v5.13.10-408-ged0d180 breaks AZAWAWI/Syntax-Highlight-Perl6-0.88.tar.gz #11241
Comments
From @andkgit bisect: ed0d180 is the first bad commit Switch Storable to IO::File from FileHandle, only load if needed On blead IO::File would be autoloaded but can't rely on this as example fail report: http://www.cpantesters.org/cpan/report/1977fc20-600b-11e0-9f9d-81ac42987c1d perl -V: Summary of my perl5 (revision 5 version 13 subversion 10) configuration: Characteristics of this binary (from libperl): -- |
From @dglOn 6 Apr 2011, at 21:08, (Andreas J. Koenig) (via RT) wrote:
Looks like it relied on loading Storable resulting in IO::File being loaded. This previously was the case but ed0d180 changed to a require as only file_magic needed it loaded. (Syntax::Highlight::Perl6 doesn't directly load Storable; STD loads Storable via STD::Cursor then CursorBase). David |
The RT System itself - Status changed from 'new' to 'open' |
From @dglOn Wed, Apr 06, 2011 at 10:35:02PM +0100, David Leadbeater wrote:
However, that is not the whole story, there is another issue here as It turns out loading IO::Handle is enough for IO::File's new method to This means the feature added in 15e6cdd to automatically load $ perl -MIO::Handle -e'IO::File->new("x") This feels like a blocker to me, as it makes the automatic IO::File David |
From @dglOn 7 Apr 2011, at 09:52, David Leadbeater wrote:
One solution is to always load IO::File if IO::Handle is loaded. This therefore avoids the case where only IO::Handle but not IO::File is loaded even existing. I'm not sure I *like* this as a solution (as it introduces a circular dep.), but it does seem to solve the problem. I wouldn't be surprised if there's some large caveat I'm missing though . All tests pass with the attached patch. |
From @dgl0001-Require-IO-File-in-IO-Handle.patchFrom 2c2288612c512c1351dcd4453bac830d8f3df828 Mon Sep 17 00:00:00 2001
From: David Leadbeater <dgl@dgl.cx>
Date: Fri, 8 Apr 2011 21:33:20 +0100
Subject: [PATCH] Require IO::File in IO::Handle
Since 15e6cdd IO::File has been loaded automatically. However this
automatic loading would not happen in all cases if IO::Handle was
loaded previously. This is due to the @ISA for IO::File being
initialised by the core (see the discussion in [perl #87940]).
By ensuring IO::File is loaded if IO::Handle is the indeterminate
state cannot occur.
---
dist/IO/lib/IO/Handle.pm | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dist/IO/lib/IO/Handle.pm b/dist/IO/lib/IO/Handle.pm
index f6974eb..a7431fa 100644
--- a/dist/IO/lib/IO/Handle.pm
+++ b/dist/IO/lib/IO/Handle.pm
@@ -265,10 +265,16 @@ use Symbol;
use SelectSaver;
use IO (); # Load the XS module
+# Since perl will automatically require IO::File if needed, but also
+# initialises IO::File's @ISA as part of the core we must ensure
+# IO::File is loaded if IO::Handle is. This avoids effectively
+# "half-loading" IO::File.
+require IO::File;
+
require Exporter;
@ISA = qw(Exporter);
-$VERSION = "1.30";
+$VERSION = "1.31";
$VERSION = eval $VERSION;
@EXPORT_OK = qw(
--
1.7.4.2
|
From @cpansproutOn Sat Apr 09 03:01:26 2011, dgl wrote:
Although I don’t particularly like this solution either, the only other
Circular dependencies between modules in the same distribution are fine.
Not that I can think of. So I have just applied your patch as efc5c7c. Thank you. |
@cpansprout - Status changed from 'open' to 'resolved' |
From @cpansproutOn Sun Apr 10 18:28:30 2011, sprout wrote:
Famous last words. It works for pure-OO modules, but importing/exporting can complicate things. See: http://perl5.git.perl.org/perl.git/commitdiff/221e5db
|
Migrated from rt.perl.org#87940 (status was 'resolved')
Searchable as RT87940$
The text was updated successfully, but these errors were encountered: