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

๐Ÿ’– Crypt::Random::Source::Base::File(3pm) ๐Ÿ’–

okay so bestie, welcome to the manual page for Crypt::Random::Source::Base::File โ€” it's a lil Perl module, it lives in the "User Contributed Perl Documentation" section of your man pages (section 3pm, iykyk), and it's literally the blueprint every file-based random data source out there inherits from. ๐ŸŽ€


โœจ NAME โœจ

Crypt::Random::Source::Base::File โ€” File (or device) random data sources ๐ŸŒˆ๐Ÿ”ฎ


๐ŸŒธ VERSION ๐ŸŒธ

version 0.14 โ€” yeah she's an OG, she's been sitting here since forever and she still slays ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

so if you wanna build your own file-based random source, you subclass this bad girl like so:

use Moo;
extends qw(Crypt::Random::Source::Base::File);

has '+path' => (
    default => "/foo/bar",
);

look at that. Moo, extends, and then you just tweak the inherited path attribute with a default of your own. main character subclassing energy fr fr ๐Ÿ‘‘


๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

so what even is this? It's a base class โ€” like, the ancestor, the blueprint, the momager โ€” for random data sources that are files, or file-like things (devices count too, bestie, they're giving file energy). ๐Ÿซถ

You don't use this directly. You extends it. It does the boring plumbing so your subclass can just vibe. โœจ


๐Ÿ“ ATTRIBUTES ๐Ÿ“

๐Ÿงš path

A required attribute, and it's exactly what it sounds like: the path to the file you wanna open. No path, no party. ๐ŸŽ€

it's required bestie, so don't come crying to me when your subclass blows up without one ๐Ÿ’€

โญ METHODS โญ

๐ŸŒŸ open_handle

Uses IO::File to open path for reading. That's the whole thing. She opens the handle, she reads, she serves. ๐Ÿ“–โœจ


๐ŸŽ€ SUPPORT ๐ŸŽ€

Got bugs? (not the cute kind, sadly ๐Ÿ˜ญ) You can submit them through the RT bug tracker:

https://rt.cpan.org/Public/Dist/Display.html?Name=Crypt-Random-Source

or you can email them straight to the tracker at bug-Crypt-Random-Source@rt.cpan.org โ€” go off, report responsibly ๐Ÿซก๐Ÿ’–


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>

(that first name is literally X's in the original, no cap, I'm not censoring anything, that's just what it says ๐Ÿ’€)


This software is copyright (c) 2008 by Yuval Kogman.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. So like, go wild, remix it, redistribute it, it's giving open source royalty ๐Ÿ‘‘โœจ


and that's the whole page bestie!! ๐Ÿฆ‹ this doc came from perl v5.34.0, dated 2022-04-09, and it's filed under Crypt:...e::File(3pm) โ€” mwah, go read your man pages, they're iconic, periodt ๐Ÿ’…๐Ÿ’–๐ŸŽ€

๐Ÿ“ฆ where this page comes from