NAME
App::Chart::Sympred -- symbol predicate objects
SYNOPSIS
use App::Chart::Sympred;
my $sympred = App::Chart::Sympred::Suffix->new ('.AX');
$sympred->match('FOO.AX') # returns true
DESCRIPTION
A App::Chart::Sympred object represents a predicate for use on stock and commodity symbols, ie. a test of whether a symbol has a certain suffix or similar.
FUNCTIONS
- $sympred->match ($symbol)
-
Return true if
$symbolis matched by the$sympredobject. - App::Chart::Sympred::validate ($obj)
-
Check that
$objis aApp::Chart::Sympredobject, throw an error if not. - App::Chart::Sympred::Equal->new ($suffix)
-
Return a new
App::Chart::Sympredobject which matches only the given symbol exactly. Eg.my $sympred = App::Chart::Sympred::Equal->new ('FOO.BAR') - App::Chart::Sympred::Suffix->new ($suffix)
-
Return a new
App::Chart::Sympredobject which matches the given symbol suffix. Eg.my $sympred = App::Chart::Sympred::Suffix->new ('.FOO') - App::Chart::Sympred::Prefix->new ($prefix)
-
Return a new
App::Chart::Sympredobject which matches the given symbol prefix. Eg.my $sympred = App::Chart::Sympred::Prefix->new ('^NZ') - App::Chart::Sympred::Regexp->new (qr/.../)
-
Return a new
App::Chart::Sympredobject which matches the given regexp pattern. Eg.my $sympred = App::Chart::Sympred::Regexp->new (qr/^\^BV|\.SA$/); - App::Chart::Sympred::Proc->new (\&proc)
-
Return a new
App::Chart::Sympredobject which calls the givenprocsubroutine to test for a match. Eg.sub my_fancy_test { my ($symbol) = @_; return (some zany test on $symbol); } my $sympred = App::Chart::Sympred::Proc->new (\&my_fancy_test); - App::Chart::Sympred::Any->new ($pred,...)
-
Return a new
App::Chart::Sympredobject which is true if any of the given$predpredicates is true. Eg.my $nz = App::Chart::Sympred::Suffix->new ('.NZ') my $bc = App::Chart::Sympred::Suffix->new ('.BC') my $sympred = App::Chart::Sympred::Any->new ($nz, $bc); - $pred->add ($pred,...)
-
Add additional predicates to a
App::Chart::Sympred::Anyobject.