[Bast-commits] r8115 -
DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class
goraxe at dev.catalyst.perl.org
goraxe at dev.catalyst.perl.org
Tue Dec 15 21:14:22 GMT 2009
Author: goraxe
Date: 2009-12-15 21:14:20 +0000 (Tue, 15 Dec 2009)
New Revision: 8115
Modified:
DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin.pm
Log:
dep check to end of module
Modified: DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin.pm
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin.pm 2009-12-15 12:08:56 UTC (rev 8114)
+++ DBIx-Class/0.08/branches/dbicadmin_refactor/lib/DBIx/Class/Admin.pm 2009-12-15 21:14:20 UTC (rev 8115)
@@ -23,12 +23,14 @@
use MooseX::Types::JSON qw(JSON);
use MooseX::Types::Path::Class qw(Dir File);
use Try::Tiny;
+
use parent 'Class::C3::Componentised';
-use Data::Dumper;
use JSON::Any;
+my @_deps = qw(Moose MooseX::Types MooseX::Types::JSON MooseX::Types::Path::Class Try::Tiny parent JSON::Any Class::C3::Componentised);
+
coerce ArrayRef,
from JSON,
via { _json_to_data ($_) };
@@ -543,6 +545,23 @@
return $ret;
}
+
+{ # deps check
+
+my @_missing_deps;
+foreach my $dep (@_deps) {
+ eval "require $dep";
+ if ($@) {
+ push @_missing_deps, $dep;
+ }
+}
+
+if (@_missing_deps > 0) {
+ die "The following dependecies are missing " . join ",", @_missing_deps;
+}
+
+
+}
=head1 AUTHOR
Gordon Irving <goraxe at cpan.org>
More information about the Bast-commits
mailing list