Algori...e::HoA(3pm)

πŸ’– Algori...e::HoA(3pm) β€” your bestie's guide to Algorithm::Dependency::Source::HoA πŸ’–

okay so first things first, the manual page name is Algori...e::HoA(3pm) (it's truncated in the header, iconic behavior honestly, we move). This one lives in the User Contributed Perl Documentation section and it's about dependency sources, which sounds dry but it's actually so slay once you get it.


✨ NAME ✨

Algorithm::Dependency::Source::HoA β€” Source for a HASH of ARRAYs

like. it's a source. made out of a hash of arrays. the name is not playing games with you bestie, it tells you exactly what it is πŸ’…

🌸 VERSION 🌸

version 1.112

πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole vibe, look at the data structure first:

# The basic data structure
my $deps = {
    foo => [ 'bar', 'baz' ],
    bar => [],
    baz => [ 'bar' ],
    };

so foo depends on bar and baz, bar depends on literally nobody (main character energy fr), and baz depends on bar. and then you make the source:

# Create the source from it
my $Source = Algorithm::Dependency::Source::HoA->new( $deps );

and that's it. that's the whole thing. ate and left no crumbs πŸŽ€

🌈 DESCRIPTION 🌈

Algorithm::Dependency::Source::HoA implements a source where the item names are handed over in the absolute simplest form possible: a reference to a HASH of ARRAY references. that's the lowkey beauty of it β€” no weird file formats, no parsing drama, just a hash where every key points at an array of the things it depends on. periodt.

πŸ‘‘ METHODS πŸ‘‘

heads up: this part only documents the methods that are different from the regular Algorithm::Dependency::Source methods. the rest you already know, iykyk.

πŸ’œ new $filename

when you're constructing a new Algorithm::Dependency::Source::HoA object, you gotta pass in an argument that's a reference to a HASH of ARRAY references, containing the names of other HASH elements. (yes the parameter is called $filename even though you're handing it a hashref, i don't make the rules, i just document them πŸ’€)

it returns the object, or undef if the structure is not correct. so like, if you hand it garbage, you get undef back. no exceptions, no explanations, just undef. check for that bestie, fr fr.

⭐ SEE ALSO ⭐

  • Algorithm::Dependency
  • Algorithm::Dependency::Source

🫢 SUPPORT 🫢

bugs may be submitted through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Dependency> β€” or, if you'd rather email, bug-Algorithm-Dependency@rt.cpan.org (mailto:bug-Algorithm-Dependency@rt.cpan.org). go tell them what's wrong, they wanna know πŸ™ˆ

πŸ’– AUTHOR πŸ’–

Adam Kennedy <adamk@cpan.org>

This software is copyright (c) 2003 by Adam Kennedy.

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


okay one lil safety note bestie: pass it a proper HASH of ARRAY references or you're getting undef handed back to you like a bad vibe check. that's not me being dramatic, that's just the method doin its job πŸ“

and that's the whole page!! written by the incredible perl v5.40.1 on 2025-09-18. tysm for reading, go build something cute with your dependency graph, mwah πŸ’…βœ¨

πŸ“¦ where this page comes from