From: Peter Rabbitson Date: Thu, 8 Jan 2015 18:33:57 +0000 (+0100) Subject: Deprecate req_errorlist_for, proxy to to modreq_errorlist_for X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5ffa39c7107784527d490d4388fbbacd4cf2e704;p=dbsrgits%2FDBIx-Class.git Deprecate req_errorlist_for, proxy to to modreq_errorlist_for Leaving the old method in place indefinitely - may be used in the wild --- diff --git a/lib/DBIx/Class/Optional/Dependencies.pm b/lib/DBIx/Class/Optional/Dependencies.pm index d81f5b7..657f1d7 100644 --- a/lib/DBIx/Class/Optional/Dependencies.pm +++ b/lib/DBIx/Class/Optional/Dependencies.pm @@ -654,7 +654,8 @@ sub req_group_list { } } -sub req_errorlist_for { +sub req_errorlist_for { shift->modreq_errorlist_for(@_) } # deprecated +sub modreq_errorlist_for { my $self = shift; $self->_errorlist_for_modreqs( $self->_groups_to_reqs(@_)->{modreqs} ); } @@ -1006,7 +1007,7 @@ Checks if L passes for the supplied group(s), and in case of failure throws an exception including the information from L. -=head2 req_errorlist_for +=head2 modreq_errorlist_for =over @@ -1018,6 +1019,11 @@ from L. Returns a hashref containing the actual errors that occurred while attempting to load each module in the requirement group(s). + +=head2 req_errorlist_for + +Deprecated method name, equivalent (via proxy) to L. + EOC diff --git a/xt/optional_deps.t b/xt/optional_deps.t index 57b333d..e0ac76c 100644 --- a/xt/optional_deps.t +++ b/xt/optional_deps.t @@ -72,7 +72,7 @@ is_deeply ( ); like ( - DBIx::Class::Optional::Dependencies->req_errorlist_for ($_)->{'SQL::Translator'}, + DBIx::Class::Optional::Dependencies->modreq_errorlist_for ($_)->{'SQL::Translator'}, qr/Optional Dep Test/, 'custom exception found in errorlist', ); @@ -101,6 +101,7 @@ is_deeply ( ); is_deeply ( + # use the deprecated method name DBIx::Class::Optional::Dependencies->req_errorlist_for ($_), undef, 'expected empty errorlist',