Skip Menu |

This queue is for tickets about the Object-Lazy CPAN distribution.

Report information
The Basics
Id: 77170
Status: resolved
Priority: 0/
Queue: Object-Lazy

People
Owner: Nobody in particular
Requestors: mst [...] shadowcat.co.uk
Cc:
AdminCc:

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



Subject: Engligh.pm, Try::Tiny and UNIVERSAL::ref
Date: Sat, 12 May 2012 20:53:54 +0100
To: bugs-Object-Lazy [...] rt.cpan.org
From: Matt S Trout <mst [...] shadowcat.co.uk>
English.pm is almost never used in my experience, and while I entirely respect your choice to use it if you do, most developers miss the -no_match_vars thing and end up slowing everything down. I'd suggest that ideally you would either document it using $@, or using Try::Tiny - which is far superior if you're trying to do things "nicely" and traps more common errors using eval than anything else does. You also might want to look at UNIVERSAL::ref which removes the need to override CORE::GLOBAL::ref in the way you're doing - it's a neat trick but CORE::GLOBAL::* overrides are a pain in the neck sometimes (speaking as somebody who's done more than a few of them :) and while it does mean non-core XS dependencies I'd recommend it as at least an -optional- way of doing things. No reason you can't do $old_core_global_ref->($ref) inside your current ::Ref either. Other than that, the only thing I'd mention is that there doesn't seem to be any point to using Module::Build - other than complicated XS builds there's no advantage over ExtUtils::MakeMaker and Module::Build is in maintainance-only mode as a failed project whereas ExtUtils::MakeMaker is actively maintained. -- Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/ Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst commercial support, training and consultancy packages could help your team.
Thank you for all your comments about this module. Show quoted text
> English.pm is almost never used in my experience, and while I entirely > respect your choice to use it if you do, most developers miss the > -no_match_vars thing and end up slowing everything down.
This module is perlcritc level 1 tested and so I use English in that way Damian Conway wrote that. Show quoted text
> I'd suggest that ideally you would either document it using $@, or > using Try::Tiny - which is far superior if you're trying to do things > "nicely" and traps more common errors using eval than anything else
does. This module is very old, older then Try::Tiny but in next release I use this. Show quoted text
> You also might want to look at UNIVERSAL::ref ...
I do. Show quoted text
> Other than that, the only thing I'd mention is that there doesn't
seem to Show quoted text
> be any point to using Module::Build - other than complicated XS builds > there's no advantage over ExtUtils::MakeMaker and Module::Build is in > maintainance-only mode as a failed project whereas
The reason I use Module::Build is trhat I run "Build ppmdist" and "Build ppd" because I build module on Windows and use them in ActiveState Perl. I could not found ppm support in Distzilla neither in Module::Install I tried last days.
Subject: Re: [rt.cpan.org #77170] Engligh.pm, Try::Tiny and UNIVERSAL::ref
Date: Thu, 19 Jul 2012 11:52:45 +0100
To: Steffen Winkler via RT <bug-Object-Lazy [...] rt.cpan.org>
From: Matt S Trout <mst [...] shadowcat.co.uk>
On Thu, Jul 19, 2012 at 12:21:51AM -0400, Steffen Winkler via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=77170 > > > Thank you for all your comments about this module. >
> > English.pm is almost never used in my experience, and while I entirely > > respect your choice to use it if you do, most developers miss the > > -no_match_vars thing and end up slowing everything down.
> > This module is perlcritc level 1 tested and so I use English in that > way Damian Conway wrote that.
I don't mind you using it internally, I just don't want it in the docs. Use of Perl::Critic is a choice and I'd rather your docs didn't make that choic for the user. Show quoted text
> > I'd suggest that ideally you would either document it using $@, or > > using Try::Tiny - which is far superior if you're trying to do things > > "nicely" and traps more common errors using eval than anything else
> does. > > This module is very old, older then Try::Tiny but in next release I use > this.
Sure. Thanks. Show quoted text
> > You also might want to look at UNIVERSAL::ref ...
> I do. >
> > Other than that, the only thing I'd mention is that there doesn't
> seem to
> > be any point to using Module::Build - other than complicated XS builds > > there's no advantage over ExtUtils::MakeMaker and Module::Build is in > > maintainance-only mode as a failed project whereas
> > The reason I use Module::Build is trhat I run "Build ppmdist" > and "Build ppd" because I build module on Windows and use them in > ActiveState Perl. I could not found ppm support in Distzilla neither in > Module::Install I tried last days.
Module::Build can create a normal Makefile.PL - using Build.PL as an author side tool but putting it in the MANIFEST.SKIP so users can install using Makefile.PL works great (I used to do that :) -- Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/ Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst commercial support, training and consultancy packages could help your team.
Most is done in new release 0.12 but not the ref thing.
The ref implementation is tricky I know. So it is an optional loadable package and not the default. I am not the owner of the OO code I wrap. For using UNIVERSAL::ref I have to. I do not call $old_core_global_ref->($ref); I call { local *CORE::GLOBAL::ref = $old_core_global_ref; ref $ref; } So I have not the prototype problem. At the end of 10_ref.t I test that prototype behaviour.