Scroll to navigation

SReview::Files::Factory(3pm) User Contributed Perl Documentation SReview::Files::Factory(3pm)

NAME

SReview::Files::Factory

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

This module is used internally by SReview to abstract access to files.

The "Factory" class contains an implementation for direct (i.e., through the filesystem) access to files. Alternative implementations exist for other access methods (through HTTP, S3, SSH, etc.) as separate modules.

METHODS

create

Factory method to create an object for a specific collection.

Takes two positional arguments: the first is the name of the collection; the second is the "relname" of the collection.

If the name is "input", the "relname" argument is passed as the "globpattern" property for the newly-created collection. In all other cases, the "relname" is passed as the "baseurl".

Returns a new SReview::Files::Collection::Base object.

AUTHOR

Wouter Verhelst <w@uter.be>

2026-02-15 perl v5.40.1