Skip Menu |

This queue is for tickets about the Type-Tiny CPAN distribution.

Report information
The Basics
Id: 86813
Status: resolved
Priority: 0/
Queue: Type-Tiny

People
Owner: perl [...] toby.ink
Requestors: mascip [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.007_06
  • 0.007_07
  • 0.007_08
  • 0.007_09
  • 0.007_10
  • 0.008
  • 0.009_01
  • 0.009_02
  • 0.009_03
  • 0.009_04
  • 0.009_05
  • 0.009_06
  • 0.009_07
  • 0.010
  • 0.011_01
  • 0.011_02
  • 0.011_03
  • 0.012
  • 0.013_01
  • 0.014
  • 0.015_01
  • 0.015_02
  • 0.015_03
Fixed in: (no value)



Subject: 'extends' is not declared
In Version 0.007_05 everything works fine. In version 0.007_06 and all versions above, i get an error here: package MASCIP::Types::Basic; use version; our $VERSION = qv('0.0.1'); use Type::Library -base; use Type::Utils; BEGIN { extends 'Types::Standard' }; on the last line, it says that "extends" is not declared. (reading through the diff...) Ah, i found the solution! i just have to add -all after Type::Utils apparently. Yes: Type::Utils -all; solves my problem. If that's indeed the problem, then the POD of Type::Tiny::Manual::Libraries needs a slight change. If you just add -all after Type::Utils in this POD, that should do. I'll submit a pull request right now. It's a tiny change but it might affect other people too. In fact, i'm not sure where, but maybe that this "change in API" should be indicated somewhere (in the POD?), so that people know where to look when they have the same problem.
Thanks for the patch. Yes, I stopped exporting `extends` by default because if people were using Moo/Mouse/Moose they didn't want Type::Utils' `extends` function stomping on their OO framework's `extends` function. (And `extends` is only really useful in type libraries.) I'm marking this as "patched" now and will close the issue once there's a stable release on CPAN with this doc patch.
Subject: Re: [rt.cpan.org #86813] 'extends' is not declared
Date: Wed, 10 Jul 2013 11:07:01 +0100
To: bug-Type-Tiny [...] rt.cpan.org
From: mascip <mascip [...] gmail.com>
Cool, glad i could help others avoid the same upgrade-pitfall =) I use Moo too in the same project, but haven't needed to use 'extends' so far (i play with Roles instead). So, would everything work alright if i extended a Moo class where i use MASCIP::Types::Basic (which uses Type::Utils -all) ? I guess Type::Tiny's 'extends' would only get used in my Type::Library; right? On 10 July 2013 10:34, Toby Inkster via RT <bug-Type-Tiny@rt.cpan.org>wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=86813 > > > Thanks for the patch. > > Yes, I stopped exporting `extends` by default because if people were using > Moo/Mouse/Moose they didn't want Type::Utils' `extends` function stomping > on their OO framework's `extends` function. > > (And `extends` is only really useful in type libraries.) > > I'm marking this as "patched" now and will close the issue once there's a > stable release on CPAN with this doc patch. >
That should be fine. Your type library won't re-export any of the things it imported from Type::Utils.
resolved in 0.016