.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "GO::Utils 3pm" .TH GO::Utils 3pm "2021-01-09" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" GO::Utils \- utilities for GO modules .SS "\fBrearrange()\fP" .IX Subsection "rearrange()" .Vb 10 \& Usage : n/a \& Function : Rearranges named parameters to requested order. \& Returns : @params \- an array of parameters in the requested order. \& Argument : $order : a reference to an array which describes the desired \& order of the named parameters. \& @param : an array of parameters, either as a list (in \& which case the function simply returns the list), \& or as an associative array (in which case the \& function sorts the values according to @{$order} \& and returns that new array. \& \& Exceptions : carps if a non\-recognised parameter is sent .Ve .SS "\fBget_param()\fP" .IX Subsection "get_param()" Usage : get_param('name',(\-att1=>'ben',\-name=>'the_name')) Function : Fetches a named parameter. Returns : The value of the requested parameter. Argument : \f(CW$name\fR : The name of the the parameter desired \f(CW@param\fR : an array of parameters, as an associative array Exceptions : carps if a non-recognised parameter is sent .PP Based on \fBrearrange()\fR, which is originally from \s-1CGI\s0.pm by Lincoln Stein and BioPerl by Richard Resnick. See \fBrearrange()\fR for details. .SS "remove_duplicates" .IX Subsection "remove_duplicates" remove duplicate items from an array .PP .Vb 1 \& usage: remove_duplicates(\e@arr) .Ve .PP affects the array passed in, and returns the modified array .SH "merge_hashes" .IX Header "merge_hashes" joins two hashes together .PP .Vb 1 \& usage: merge_hashes(\e%h1, \e%h2); .Ve .PP \&\f(CW%h1\fR will now contain the key/val pairs of \f(CW%h2\fR as well. if there are key conflicts, \f(CW%h2\fR values will take precedence. .SH "get_method_ref" .IX Header "get_method_ref" .Vb 3 \& returns a pointer to a particular objects method \& e.g. my $length_f = get_method_ref($seq, \*(Aqlength\*(Aq); \& $len = &$length_f(); .Ve .SS "pset2hash" .IX Subsection "pset2hash" .Vb 3 \& Usage \- my $h = pset2hash([{name=>"id", value=>"56"}, {name=>"name", value=>"jim"}]); \& Returns \- hashref \& Args \- arrayref of name/value keyed hashrefs .Ve .SS "spell_greek" .IX Subsection "spell_greek" takes a word as a parameter and spells out any greek symbols encoded within (eg s/&agr;/alpha/g) .SS "check_obj_graph" .IX Subsection "check_obj_graph" .Vb 3 \& Usage \- \& Returns \- true if cycle detected \& Args \- any object .Ve