summaryrefslogtreecommitdiff
path: root/usr/src/libpiny/lib/Piny
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/libpiny/lib/Piny')
-rw-r--r--usr/src/libpiny/lib/Piny/Email.pm2
-rw-r--r--usr/src/libpiny/lib/Piny/Repo.pm8
-rw-r--r--usr/src/libpiny/lib/Piny/User.pm4
3 files changed, 4 insertions, 10 deletions
diff --git a/usr/src/libpiny/lib/Piny/Email.pm b/usr/src/libpiny/lib/Piny/Email.pm
index e031c34..7ad17d8 100644
--- a/usr/src/libpiny/lib/Piny/Email.pm
+++ b/usr/src/libpiny/lib/Piny/Email.pm
@@ -18,8 +18,6 @@ subtype 'EmailAddress'
=> message { 'That does not appear to be a valid email address.' }
;
-Moose::Util::TypeConstraints::export_type_constraints_as_functions;
-
# Attributes
has 'address' =>
diff --git a/usr/src/libpiny/lib/Piny/Repo.pm b/usr/src/libpiny/lib/Piny/Repo.pm
index 48690c4..926f199 100644
--- a/usr/src/libpiny/lib/Piny/Repo.pm
+++ b/usr/src/libpiny/lib/Piny/Repo.pm
@@ -4,7 +4,7 @@
package Piny::Repo;
use Moose;
-use Moose::Util::TypeConstraints;
+use Moose::Util::TypeConstraints qw( find_type_constraint );
use File::Find qw( find );
use File::Temp qw( );
@@ -31,8 +31,6 @@ subtype 'SimpleText'
=> message { 'That description is not in the correct format for a piny repo.' }
;
-Moose::Util::TypeConstraints::export_type_constraints_as_functions;
-
# Attributes
has 'name' =>
@@ -250,8 +248,8 @@ sub create {
my $user = Piny::Environment->new->user;
- Reponame->assert_valid( $name );
- SimpleText->assert_valid( $description );
+ find_type_constraint( "Reponame" )->assert_valid( $name );
+ find_type_constraint( "SimpleText" )->assert_valid( $description );
my $repo = $class->new( "name" => $name );
diff --git a/usr/src/libpiny/lib/Piny/User.pm b/usr/src/libpiny/lib/Piny/User.pm
index fb9a20f..f38c020 100644
--- a/usr/src/libpiny/lib/Piny/User.pm
+++ b/usr/src/libpiny/lib/Piny/User.pm
@@ -4,7 +4,7 @@
package Piny::User;
use Moose;
-use Moose::Util::TypeConstraints;
+use Moose::Util::TypeConstraints qw( find_type_constraint );
use Piny::Email;
use Piny::Group;
@@ -17,8 +17,6 @@ subtype 'Username'
=> message { 'That username is not in the correct format for a piny user.' }
;
-Moose::Util::TypeConstraints::export_type_constraints_as_functions;
-
# Attributes
has 'uid' =>