Toby Inkster avatar Toby Inkster committed b9132f3

use MooX::Types::MooseLike::Base

Comments (0)

Files changed (5)

lib/P5U/Lib/DebianRelease.pm

 };
 
 use Moo;
-use Scalar::Does;
+use MooX::Types::MooseLike::Base qw< HashRef InstanceOf >;
 use IO::Uncompress::Gunzip qw< gunzip $GunzipError >;
 use JSON             2.00  qw< from_json >;
 use LWP::Simple      0     qw< get >;
 
 has debian => (
 	is         => 'lazy',
-	isa        => does('HASH'),
+	isa        => HashRef,
 );
 
 has cache_file => (
 	is         => 'ro',
+	isa        => InstanceOf['Path::Class::File'],
 	required   => 1,
 );
 

lib/P5U/Lib/Reprove.pm

 use autodie;
 
 use Moo;
-use Scalar::Does;
+use MooX::Types::MooseLike::Base qw< ArrayRef Bool InstanceOf Str >;
 use App::Prove qw//;
 use Class::Load qw/load_class/;
 use Carp qw/confess/;
 
 has author => (
 	is         => 'lazy',
-	isa        => does(q[""]),
+	isa        => Str,
 );
 
 has release => (
 	is         => 'ro',
-	isa        => does(q[""]),
+	isa        => Str,
 	required   => 1,
 );
 
 has version => (
 	is         => 'ro',
-	isa        => does(q[""]),
+	isa        => Str,
 	required   => 1,
 );
 
 has manifest => (
 	is         => 'lazy',
-	isa        => does(q[ARRAY]),
+	isa        => ArrayRef,
 );
 
 has testdir => (
 	is         => 'lazy',
-	isa        => does(q[Path::Class::Dir]),
+	isa        => InstanceOf['Path::Class::Dir'],
 );
 
 has working_dir => (
 	is         => 'lazy',
-	isa        => does(q[Path::Class::Dir]),
+	isa        => InstanceOf['Path::Class::Dir'],
 );
 
 has verbose => (
 	is         => 'rw',
-	isa        => does(q[bool]),
+	isa        => Bool,
 	required   => 1,
 	default    => sub { 0 },
 );

lib/P5U/Lib/Testers.pm

 };
 
 use Moo;
-use Scalar::Does;
+use MooX::Types::MooseLike::Base qw< ArrayRef Bool Str InstanceOf >;
 use File::Spec       0 qw< >;
 use JSON             0 qw< from_json >;
 use LWP::Simple      0 qw< mirror is_success >;
 use List::Util       0 qw< maxstr >;
-use Object::AUTHORITY qw/AUTHORITY/;
+use Object::AUTHORITY  qw< AUTHORITY >;
 use Path::Class      0 qw< dir file >;
 use namespace::clean;
 
 has distro => (
 	is         => 'ro',
-	isa        => does(q[""]),
+	isa        => Str,
 	required   => 1,
 );
 
 has version => (
 	is         => 'lazy',
-	isa        => does(q[""]),
+	isa        => Str,
 );
 
 has os_data => (
 	is         => 'ro',
-	isa        => does(q[bool]),
+	isa        => Bool,
 	default    => sub { 0 },
 );
 
 has stable => (
 	is         => 'ro',
-	isa        => does(q[bool]),
+	isa        => Bool,
 	default    => sub { 0 },
 );
 
 has cache_dir => (
 	is         => 'lazy',
-	isa        => does(q[bool]),
+	isa        => InstanceOf['Path::Class::Dir'],
 );
 
 has results => (
 	is         => 'lazy',
-	isa        => does(q[ARRAY]),
+	isa        => ArrayRef,
 );
 
 sub version_data

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

meta/makefile.ttl

 	:requires           "Module::Info";
 	:requires           "Module::Manifest";
 	:requires           "Moo 1.000000";
+	:requires           "MooX::Types::MooseLike::Base";
 	:requires           "namespace::clean 0.19";
 	:requires           "Object::AUTHORITY";
 	:requires           "Path::Class";
 	:requires           "Path::Class::Rule";
 	:requires           "PerlX::Maybe";
-	:requires           "Scalar::Does 0.004";
 	:requires           "Test::Pod";
 	: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.