Commits

Toby Inkster committed 633effe

MooseX::Types -> Types::Standard

Comments (0)

Files changed (9)

 	$Web::ID::VERSION   = '1.922';
 }
 
-use MooseX::Types::Moose -all;
-use Web::ID::Types -all;
+use Web::ID::Types -types;
 use Web::ID::Certificate;
 use Web::ID::Util qw(:default uniq);
 

lib/Web/ID/Certificate.pm

 
 use Crypt::X509 0.50 ();  # why the hell does this export anything?!
 use DateTime 0;
-use MooseX::Types::Moose -all;
 use Digest::SHA qw(sha1_hex);
 use MIME::Base64 0 qw(decode_base64);
-use Web::ID::Types -all;
+use Web::ID::Types -types;
 use Web::ID::SAN;
 use Web::ID::SAN::Email;
 use Web::ID::SAN::URI;

lib/Web/ID/Certificate/Generator.pm

 	$Web::ID::Certificate::Generator::VERSION   = '1.922';
 }
 
-use MooseX::Types::Moose -all;
 use Moose::Util qw(apply_all_roles);
 use File::Temp qw();
 use Path::Class qw();
 use RDF::Trine qw(statement blank iri literal);
 use Web::ID::Certificate;
-use Web::ID::Types ':all';
+use Web::ID::Types -types;
 use Web::ID::Util;
 
 use Moose::Role;

lib/Web/ID/RSAKey.pm

 	$Web::ID::RSAKey::VERSION   = '1.922';
 }
 
-use MooseX::Types::Moose -all;
-use Web::ID::Types -all;
+use Web::ID::Types -types;
 use Web::ID::Util;
 
 use Moose;

lib/Web/ID/SAN.pm

 	$Web::ID::SAN::VERSION   = '1.922';
 }
 
-use MooseX::Types::Moose -all;
-use Web::ID::Types -all;
+use Web::ID::Types -types;
 use RDF::Query 2.900;
 use URI 0;
 use URI::Escape 0 qw/uri_escape/;

lib/Web/ID/SAN/Email.pm

 	}
 }
 
-use MooseX::Types::Moose -all;
-use Web::ID::Types -all;
+use Web::ID::Types -types;
 use Web::ID::Util;
 
 use Moose;

lib/Web/ID/SAN/URI.pm

 	$Web::ID::SAN::URI::VERSION   = '1.922';
 }
 
-use MooseX::Types::Moose -all;
-use Web::ID::Types -all;
+use Web::ID::Types -types;
 use Web::ID::Util;
 
 use Moose;

lib/Web/ID/Types.pm

 BEGIN {
 	$Web::ID::Types::AUTHORITY = 'cpan:TOBYINK';
 	$Web::ID::Types::VERSION   = '1.922';
-}
+};
 
 use DateTime;
 use Math::BigInt;
 use RDF::Trine;
 use URI;
 
-use MooseX::Types
-	-declare => [qw[ Bigint Certificate Datetime Finger Model Rsakey San Uri ]];
-use MooseX::Types::Moose -all;
+use Type::Library
+	-base,
+	-declare => qw[ Bigint Certificate Datetime Finger Model Rsakey San Uri ];
+use Type::Utils;
 
-class_type Bigint, { class => 'Math::BigInt' };
+BEGIN { extends "Types::Standard" };
+
+class_type Bigint, { class => "Math::BigInt" };
 coerce Bigint,
-	from Str, via { "Math::BigInt"->new($_) };
+	from Str, q { "Math::BigInt"->new($_) };
 		
-class_type Certificate, { class => 'Web::ID::Certificate' };
+class_type Certificate, { class => "Web::ID::Certificate" };
 coerce Certificate,
-	from HashRef, via  { "Web::ID::Certificate"->new(%$_) },
-	from Str,     via  { "Web::ID::Certificate"->new(pem => $_) };
+	from HashRef, q { "Web::ID::Certificate"->new(%$_) },
+	from Str,     q { "Web::ID::Certificate"->new(pem => $_) };
 
-class_type Datetime,	{ class => 'DateTime' };
+class_type Datetime,	{ class => "DateTime" };
 coerce Datetime,
-	from Num, via { "DateTime"->from_epoch(epoch => $_) };
+	from Num, q { "DateTime"->from_epoch(epoch => $_) };
 
-class_type Finger, { class => 'WWW::Finger' };
+class_type Finger, { class => "WWW::Finger" };
 coerce Finger,
-	from Str, via { "WWW::Finger"->new($_) if UNIVERSAL::can('WWW::Finger', 'new') };
+	from Str, q { (UNIVERSAL::can("WWW::Finger", "new") ? "WWW::Finger"->new($_) : undef) };
 
-class_type Model, { class => 'RDF::Trine::Model' };
+class_type Model, { class => "RDF::Trine::Model" };
 
-class_type Rsakey, { class => 'Web::ID::RSAKey' };
+class_type Rsakey, { class => "Web::ID::RSAKey" };
 coerce Rsakey,
-	from HashRef, via  { "Web::ID::RSAKey"->new(%$_) };
+	from HashRef, q { "Web::ID::RSAKey"->new(%$_) };
 
-class_type San, { class => 'Web::ID::SAN' };
+class_type San, { class => "Web::ID::SAN" };
 
-class_type Uri, { class => 'URI' };
+class_type Uri, { class => "URI" };
 coerce Uri,
-	from Str, via { "URI"->new($_) };
-
+	from Str, q { "URI"->new($_) };
 
 __PACKAGE__
 __END__
 
 =head1 DESCRIPTION
 
-A L<MooseX::Types> type library defining:
+A L<Type::Library> defining:
 
 =head2 Types
 
 
 =back
 
+... and re-exporting everything from L<Types::Standard>.
+
 =head1 BUGS
 
 Please report any bugs to
 
 =head1 SEE ALSO
 
-L<Web::ID>.
+L<Web::ID>, L<Type::Library>.
 
 =head1 AUTHOR
 

meta/makefile.ttl

 		"Digest::SHA",
 		"List::MoreUtils",
 		"Moose",
-		"MooseX::Types",
 		"namespace::sweep",
 		"Path::Class",
 		"Plack",
 		"RDF::Query 2.900",
 		"RDF::Trine 1.000",
 		"Sub::Exporter",
+		"Types::Standard 0.004",
 		"URI";
 	:test_requires
 		"Test::More 0.61"  .
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.