Bio::D...arrange(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ NAME ✨

Bio::DB::GFF::Util::Rearrange β€” it's the rearrange utility bestie, and it's literally here to put your args in order πŸ’…

(it lives in the Bio::D...arrange(3pm) page of the User Contributed Perl Documentation, if you were wondering where you wandered into πŸ¦‹)


🌸 SYNOPSIS 🌸

use Bio::DB::GFF::Util::Rearrange 'rearrange';

my ($arg1,$arg2,$arg3,$others) = rearrange(['ARG1','ARG2','ARG3'],@args);

okay so that's the whole vibe right there β€” import it, call it, get your stuff back in order πŸŽ€


πŸ’– DESCRIPTION πŸ’–

So this is a different version of the _rearrange() method from Bio::Root::Root. The way it differs? Two things, and they're both kind of a big deal:

  • it runs as a function call, not as a method call 🫢
  • it handles unidentified parameters slightly differently πŸ™ˆ

It exports a single function call:

🧚 rearrange

@rearranged_args = rearrange(\@parameter_names,@parameters);

Let me break that down because it's giving main character energy:

  • The first argument is an array reference containing a list of parameter names, and those names are in the order you want them. That's the desired order, periodt. ✨
  • The second and subsequent arguments are a list of parameters, formatted like this:
(-arg1=>$arg1,-arg2=>$arg2,-arg3=>$arg3...)

And what does the function call return? The parameter values, in the order in which they were specified in @parameter_names. slay. 🌈

Any parameters that were not found in @parameter_names? They don't get yeeted, bestie, don't worry πŸ’œ β€” they come back as a hash reference in which the keys are the uppercased forms of the parameter names, and the values are the parameter values. iykyk 😌


πŸ’€ BUGS πŸ’€

None known yet.

(iconic, no cap β€” may this stay true forever πŸ•―οΈ)


πŸ‘‘ SEE ALSO πŸ‘‘

  • Bio::DB::GFF,

(yes, that trailing comma is canon, we don't touch the source material here πŸŽ€)


πŸ“ AUTHOR πŸ“

Lincoln Stein <lstein@cshl.org>.

Copyright (c) 2001 Cold Spring Harbor Laboratory.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


fr fr, that's the whole page, and honestly? ate. no crumbs. πŸ’…

perl v5.32.1 Β· 2021-08-15 β€” that's the version and the date this lil page came into the world, and it's been serving ever since πŸ¦‹πŸ’–

πŸ“¦ where this page comes from