Permalink
Browse files

Allow allele_request() to take single (hasref) argument or list of ke…

…y/value pairs
  • Loading branch information...
1 parent f1f3840 commit bcdfc3e8c4c1015dff8502890f2963894a01ae69 Ray Miller committed Jul 30, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/LIMS2/AlleleRequestFactory.pm
@@ -27,7 +27,9 @@ sub plugins {
## no critic(RequireFinalReturn)
sub allele_request {
- my ( $self, %params ) = @_;
+ my $self = shift;
+
+ my %params = @_ == 1 ? %{$_[0]} : @_;
my $targeting_type = delete $params{targeting_type}
or LIMS2::Exception::Implementation->throw( "allele_request() requires targeting_type" );

0 comments on commit bcdfc3e

Please sign in to comment.