Author image Johan Vromans
and 1 contributors


Comics::Fetcher::Cascade -- Cascading url grabber


  package Comics::Plugin::Sigmund;
  use parent qw(Comics::Fetcher::Cascade);

  our $name    = "Sigmund";
  our $url     = "";
  our @patterns = ( [ qr{ ... (?<url>...) ... },
                      qr{ ... (?<url>...) ... },
                      qr{ ... (?<url>...) ... } ],

  # Return the package name.


The Cascading Fetcher can use one or more patterns to determine the URL of the desired image. If multiple patterns are supplied, each pattern is applied to the fetched page and must define the url for the next page as a named capture. The process is repeated, and the final pattern has to provide the final url and image name.

The Fetcher requires the common package variables:


The full name of this comic, e.g. "Fokke en Sukke".


The url of this comic's starting (i.e. home) page.

Fetcher specific arguments:

This Fetcher requires either $path (direct URL fetch), $pattern (single fetch), or @patterns (cascading fetch).


The URL of the desired image.

If path is not an absolute URL, it will be interpreted relative to the url.


A pattern to locate the image URL from the starting page.


An array with patterns to locate the image URL.

When a pattern matches, it must define the named capture url, which points to the page to be loaded and used for the next pattern.

Any of the patterns may additionally define:


The image title.


The alternative text.