Changeset 22822


Ignore:
Timestamp:
09/09/10 10:33:04 (17 months ago)
Author:
alex
Message:

Allowed passing roles through from the InterMine factory class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mnw21/pathquery_refactor/intermine/perl/lib/InterMine.pm

    r22659 r22822  
    8686sub new_query { 
    8787    my $class = shift; 
    88     return $class->get_service(@_)->new_query; 
     88    my %args  = @_; 
     89    my $roles = delete $args{with}; 
     90    return $class->get_service(%args)->new_query(with => $roles); 
    8991} 
    9092 
     
    102104    my $class = shift; 
    103105    my $name  = shift; 
    104     return $class->get_service(@_)->template($name); 
     106    my %args  = @_; 
     107    my $roles = delete $args{with}; 
     108    return $class->get_service(%args)->template($name, $roles); 
    105109} 
    106110 
Note: See TracChangeset for help on using the changeset viewer.