Skip Menu |

This queue is for tickets about the MooseX-Types-DateTime-ButMaintained CPAN distribution.

Report information
The Basics
Id: 72473
Status: resolved
Priority: 0/
Queue: MooseX-Types-DateTime-ButMaintained

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

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



Subject: Warning with Moose 2.0400
Date: Wed, 16 Nov 2011 11:01:55 -0800
To: bug-MooseX-Types-DateTime-ButMaintained [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
I started getting this warning with the release of Moose 2.0400 yesterday: Providing an optimized subroutine ref for type constraints is deprecated. Use the inlining feature (inline_as) instead. at /usr/local/lib/perl5/site_perl/5.14.1/MooseX/Types/DateTime/ButMaintained.pm line 0 eval {...} called at /usr/local/lib/perl5/site_perl/5.14.1/MooseX/Types/DateTime/ButMaintained.pm line 0 require MooseX/Types/DateTimeX.pm called at /usr/local/lib/perl5/site_perl/5.14.1/Net/Amazon/S3/Client/Bucket.pm line 5 Any way to get a new version out with the fix? Thanks, David
Subject: [rt.cpan.org #72473] PATCH: use inline_as rather than optimize_as
Date: Tue, 22 Nov 2011 13:04:45 +0000
To: bug-MooseX-Types-DateTime-ButMaintained [...] rt.cpan.org
From: "D. Ilmari" Mannsåker <ilmari [...] photobox.com>
Hi, Here's a patch that switches the "Now" type from optimize_as to inline_as. -- ilmari
diff --git a/lib/MooseX/Types/DateTime/ButMaintained.pm b/lib/MooseX/Types/DateTime/ButMaintained.pm index a38d0dc..79999b1 100644 --- a/lib/MooseX/Types/DateTime/ButMaintained.pm +++ b/lib/MooseX/Types/DateTime/ButMaintained.pm @@ -26,9 +26,9 @@ subtype TimeZone, as 'DateTime::TimeZone'; subtype Locale, as 'DateTime::Locale'; subtype( Now, as Str, where { $_ eq 'now' }, - Moose::Util::TypeConstraints::optimize_as { - no warnings 'uninitialized'; - !ref($_[0]) and $_[0] eq 'now'; + Moose::Util::TypeConstraints::inline_as { + 'no warnings "uninitialized";'. + '!ref(' . $_[1] . ') and '. $_[1] .' eq "now"'; }, );
Subject: Re: [rt.cpan.org #72473] PATCH: use inline_as rather than optimize_as
Date: Tue, 22 Nov 2011 11:11:14 -0500
To: bug-MooseX-Types-DateTime-ButMaintained [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Nov 22, 2011, at 8:05 AM, D. Ilmari Mannsåker via RT wrote: Show quoted text
> Here's a patch that switches the "Now" type from optimize_as to > inline_as.
Thank you! That should quiet down my cron jobs… Best, David
Is this module still maintained? ;-) I'd like to have this warning be gone. I'd apply the patch and upload a new release if the author has no time. But I'd need co-maintainer status for this. What's the status, Evan? Best, Matthias
oh, my bad I'll upgrade my Mooose and try and get this fixed today. Just got the message. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
This problem should be resolved, closing ticket -- feel free to reopen. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
Show quoted text
> Providing an optimized subroutine ref for type constraints is > deprecated. Use the inlining feature (inline_as) instead. at
I was getting this too, this was -- in my case -- because I had an old version of MooseX::ClassAttribute, a requirement for Olson::Abbreviations, a requirement for MX:T:DT:BM. I've updated O:A to require a new version of MX:CA, and I've updated MX:T:DT:BM to require a new version of O:A. That should solve this problem all around. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com