From: Peter Rabbitson Date: Sat, 13 Feb 2010 09:34:19 +0000 (+0000) Subject: We use Try::Tiny in a single spot, not grounds for inlusion in deps X-Git-Tag: v0.08119~9^2~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=71766122528404a08915bd504a2b8058ba3aa992;p=dbsrgits%2FDBIx-Class.git We use Try::Tiny in a single spot, not grounds for inlusion in deps --- diff --git a/lib/DBIx/Class/Admin.pm b/lib/DBIx/Class/Admin.pm index bd7cec6..8814bf7 100644 --- a/lib/DBIx/Class/Admin.pm +++ b/lib/DBIx/Class/Admin.pm @@ -244,7 +244,9 @@ has config => ( sub _build_config { my ($self) = @_; - try { require Config::Any } catch { $self->throw_exception( "Config::Any is required to parse the config file"); }; + + eval { require Config::Any } + or $self->throw_exception( "Config::Any is required to parse the config file"); my $cfg = Config::Any->load_files ( {files => [$self->config_file], use_ext =>1, flatten_to_hash=>1}); diff --git a/lib/DBIx/Class/Optional/Dependencies.pm b/lib/DBIx/Class/Optional/Dependencies.pm index 06752bb..ae10787 100644 --- a/lib/DBIx/Class/Optional/Dependencies.pm +++ b/lib/DBIx/Class/Optional/Dependencies.pm @@ -38,7 +38,6 @@ my $reqs = { %$moose_basic, 'MooseX::Types::Path::Class'=> '0.05', 'MooseX::Types::JSON' => '0.02', - 'Try::Tiny' => '0.02', 'namespace::autoclean' => '0.09', 'parent' => '0.223', 'Getopt::Long::Descriptive' => '0.081',