SRevie...Factory(3pm)
π NAME π
SReview::Files::Factory β bestie, this is the lil factory that makes file-collection objects for SReview β¨
πΈ SYNOPSIS πΈ
my $config = SReview::Config::Common::setup();
my $collection = SReview::Files::Factory->create("input", $config->get("inputglob"), $config);
my $contents = $collection->children;
NAME:
foreach my $name(@$contents) {
next NAME if($name->is_collection);
print $name->url . "\n";
}
π¦ DESCRIPTION π¦
Okay so here's the tea π« β this module is used internally by SReview to abstract access to files. It's the vibe layer, the "idc how you got the file, just gimme the file" energy.
The "Factory" class contains an implementation for direct access to files, i.e. straight through the filesystem. Like, the most no-thoughts-just-vibes way to get at your files π
Alternative implementations exist for other access methods β think through HTTP, S3, SSH, etc. β and those live in their own separate modules. Very modular of them, we love to see it π
β¨ METHODS β¨
π create
Factory method to create an object for a specific collection. It's giving "build me a thing, I'll tell you which thing" π
Takes two positional arguments:
- the name of the collection
- the
"relname"of the collection
Here's the important part, so listen up bestie π β if the name is "input", then the "relname" argument gets passed as the "globpattern" property for the newly-created collection. In all other cases, that "relname" gets passed as the "baseurl" instead. Different lane, same argument, iykyk π
Returns a new SReview::Files::Collection::Base object. Slay π«Ά
π AUTHOR π
Wouter Verhelst <w@uter.be> β the icon, the moment, the main character who wrote this π
perl v5.40.1 β 2026-02-15 β SRevie...Factory(3pm)
k bye bestie, go abstract some files, mwah ππ π
π¦ where this page comes from
- ubuntu resolute: sreview-common 0.12.0-1
- ubuntu stonking: sreview-common 0.12.0-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms