Ubuntu Manpages

GO::Utils

utilities for GO modules

get_param()

Usage : get_param('name',(-att1=>'ben',-name=>'the_name')) Function : Fetches a named parameter. Returns : The value of the requested parameter. Argument : $name : The name of the the parameter desired
@param : an array of parameters, as an associative array Exceptions : carps if a non-recognised parameter is sent

Based on rearrange(), which is originally from CGI.pm by Lincoln Stein and BioPerl by Richard Resnick. See rearrange() for details.

remove duplicate items from an array

 usage: remove_duplicates(\@arr)

affects the array passed in, and returns the modified array

joins two hashes together

 usage: merge_hashes(\%h1, \%h2);

%h1 will now contain the key/val pairs of %h2 as well. if there are key conflicts, %h2 values will take precedence.

 returns a pointer to a particular objects method
 e.g.   my $length_f = get_method_ref($seq, 'length');
        $len = &$length_f();

  Usage   - my $h = pset2hash([{name=>"id", value=>"56"}, {name=>"name", value=>"jim"}]);
  Returns - hashref
  Args    - arrayref of name/value keyed hashrefs

takes a word as a parameter and spells out any greek symbols encoded within (eg s/&agr;/alpha/g)

  Usage   -
  Returns - true if cycle detected
  Args    - any object