SRevie...Factory(3pm)

πŸ“¦ version 0.12.0, in ubuntu resolute, ubuntu stonking

πŸ’– 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:

  1. the name of the collection
  2. 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