NAME

WWW::Crawl4AI::StrategyChain - ordered list of strategy objects, pluggable at construction time

VERSION

version 0.006

SYNOPSIS

# Default chain (all applicable strategies):
my $chain = WWW::Crawl4AI::StrategyChain->new;

# Explicit strategy instances:
my $chain = WWW::Crawl4AI::StrategyChain->new(
  strategies => [ $plain, $stealth, $callback ],
);

# Subclass to override defaults:
package My::Chain;
use parent 'WWW::Crawl4AI::StrategyChain';
sub chain_classes { qw( WWW::Crawl4AI::Strategy::Plain ) }

DESCRIPTION

Holds the ordered list of strategy objects that power the fallback chain. Replaces the hardcoded @CHAIN_CLASSES array in WWW::Crawl4AI.

No fat globals: strategies live in the object. Subclass "chain_classes" to change defaults; use "add_strategy", "remove_strategy", "replace_strategy" to mutate after construction.

chain_classes

Returns the raw class-name array. Override this in a subclass to change the default class list; _build_strategies instantiates one object per class.

strategies

Arrayref of instantiated WWW::Crawl4AI::Strategy objects in execution order.

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-www-crawl4ai/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de> https://raudss.us/

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.