Source

p5-p5u / lib / P5U / Lib / Whois.pm

Diff from to

File lib/P5U/Lib/Whois.pm

 };
 
 use Moo; no warnings;
-use Scalar::Does;
+use MooX::Types::MooseLike::Base qw< ArrayRef HashRef Maybe Num Str >;
 use JSON qw(from_json);
 use LWP::Simple qw(get);
 use Object::AUTHORITY;
 
 has cpanid => (
 	is         => 'ro',
-	isa        => does(q[""]),
+	isa        => Str,
 );
 
 has metacpan_data => (
 	is         => 'lazy',
-	isa        => does(q[HASH]),
+	isa        => HashRef,
 );
 
 sub _build_metacpan_data
 
 has metacpan_releases => (
 	is         => 'lazy',
-	isa        => does(q[ARRAY]),
+	isa        => ArrayRef,
 );
 
 sub _build_metacpan_releases
 
 has $_ => (
 	is         => 'lazy',
-	isa        => sub { !defined $_[0] or does($_[0], q[""]) },
+	isa        => Maybe[Str],
 ) for qw(name city region country);
 
 sub _build_name     { $_[0]->metacpan_data->{name} }
 
 has $_ => (
 	is         => 'lazy',
-	isa        => sub { !defined $_[0] or does($_[0], q[0+]) },
+	isa        => Maybe[Num],
 ) for qw(latitude longitude);
 
 sub _build_longitude { $_[0]->metacpan_data->{location}[0] }
 
 has $_ => (
 	is         => 'lazy',
-	isa        => does(q[ARRAY]),
+	isa        => ArrayRef,
 ) for qw(website email);
 
 sub _build_website