X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FTypes%2FCombine.pm;h=dcb87ff93bd3d4db7ed74b4ddb9fbc047edf8692;hb=e9dc30af81ed775a6ac0a0f0c1daad021e5569f6;hp=3e8000271aff50d5456f82c03772e3fb2aef2552;hpb=f5559e1ce7a42af91a0e64915a8cb1e08958ae63;p=gitmo%2FMooseX-Types.git diff --git a/lib/MooseX/Types/Combine.pm b/lib/MooseX/Types/Combine.pm index 3e80002..dcb87ff 100644 --- a/lib/MooseX/Types/Combine.pm +++ b/lib/MooseX/Types/Combine.pm @@ -1,11 +1,6 @@ -=head1 NAME - -MooseX::Types::Combine - Combine type libraries for exporting - -=cut - package MooseX::Types::Combine; -our $VERSION = "0.25"; + +# ABSTRACT: Combine type libraries for exporting use strict; use warnings; @@ -25,7 +20,7 @@ use Class::MOP (); =head1 DESCRIPTION -Allows you to export types from multiple type libraries. +Allows you to export types from multiple type libraries. Libraries on the right side of the type libs passed to L take precedence over those on the left in case of conflicts. @@ -38,6 +33,12 @@ sub import { my %types = $class->_provided_types; + if ( grep { $_ eq ':all' } @types ) { + $_->import( { -into => $caller }, q{:all} ) + for $class->provide_types_from; + return; + } + my %from; for my $type (@types) { unless ($types{$type}) { @@ -109,10 +110,6 @@ sub _provided_types { L -=head1 AUTHOR - -See L. - =head1 LICENSE This program is free software; you can redistribute it and/or modify