NAME

PFT::Text::Symbol - Symbol from text scan

SYNOPSIS

my $array = PFT::Text::Symbol->scan_html($your_html_text);
foreach (PFT::Text::Symbol->scan_html($your_html_text)) {
    die unless $_->isa('PFT::Text::Symbol')
};

DESCRIPTION

Each instance represents a symbol from a PFT::Text instance. Symbols are declared within the text. They are detected as links in HTML matching <a> and <img> tags.

An example will make this easy to understand. Let's consider the following tag:

<img src=":key1:a1/b1/c1">

It will generate a symbol $s1 such that:

$s1->keyword is key1;
$s1->args is the list (a1, b1, c1);
$s1->start points to the first : character;
$s1->len points to the last 1 character;

Since a block of HTML can possibly yield multiple symbols, there's no public construction. Use the scan_html multi-constructor instead.