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

πŸ’– Algorithm::Dependency::Source::File β€” the 3pm perl man page, bestie edition πŸ’–

okay so first things first: this whole page is about Algorithm::Dependency::Source::File, a lil Perl module that lives in the Algorithm::Dependency family. That's the manual name right there, Algori...e::File(3pm), and yes it got abbreviated in the header because man pages are drama queens about column width. πŸŽ€

✨ VERSION ✨

version 1.112


🌸 DESCRIPTION 🌸

Algorithm::Dependency::Source::File sets up a source where all your items are chillin' in a flat file, in a format that's honestly pretty simple. No cap, it's the low-effort, high-reward option.

πŸ“„ File Format πŸ“„

The file is just an ordinary text file, made of a series of lines, and every single line holds the complete info for exactly one item. That's it. Each line = one item. 🌈

Blank lines? Ignored. Lines that start with the hash character #? Also ignored, because they're comments. Go off, document your own dependency tree. πŸ’…

For one item line, only word characters get used. A "word character" means all the letters and all the numbers, plus the underscore _ character. Literally anything else β€” anything that is not a word character β€” gets treated as a separator. Periodt.

The first word on the line is the name or id of the item. Then, any further words on that line are the other items that this one depends on. So the first one is the main character, and the rest are the supporting cast it needs. πŸ‘‘

For example, all of these are legal:

# A single item with no dependencies
Foo

# Another item that depends on the first one
Bar Foo

# Depending on multiple others
Bin Foo Bar

# We can use different separators
One:Two|Three-Four+Five=Six Seven

# We can also use multiple non-word characters as separators
This&*&^*&File:  is& & & :::REALLY()Neat

From those examples it should be super easy to create your own files. Like, you got this fr fr. πŸ¦‹


🧚 METHODS 🧚

This bit documents the methods that differ from the ordinary Algorithm::Dependency::Source methods. Everything else? Go read that one, bestie.

πŸŽ€ new $filename πŸŽ€

When you're constructing a brand new Algorithm::Dependency::Source::File object, you should provide an argument that is the name of the file to use. The constructor will check that the file actually exists and that it's readable β€” and if it's not, it hands you back undef. 😭 That's the vibe check failing, unfortunately.


πŸ‘€ SEE ALSO πŸ‘€

  • Algorithm::Dependency

🫢 SUPPORT 🫢

Bugs may be submitted through the RT bug tracker over at https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-Dependency (or you can email bug-Algorithm-Dependency@cpan.org β€” as in <mailto:bug-Algorithm-Dependency@cpan.org>). Found a bug? Report it, don't just suffer in silence. πŸ’œ


🌟 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. slay. πŸ’–


and that's the whole page!! huge shoutout to perl v5.40.1 and the date 2025-09-18 for showing up in the footer at the very end β€” couldn't have done it without you, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from