App::Chart::Sympred -- symbol predicate objects
use App::Chart::Sympred; my $sympred = App::Chart::Sympred::Suffix->new ('.AX'); $sympred->match('FOO.AX') # returns true
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.
App::Chart::Sympred
Return true if $symbol is matched by the $sympred object.
$symbol
$sympred
Check that $obj is a App::Chart::Sympred object, throw an error if not.
$obj
Return a new App::Chart::Sympred object which matches only the given symbol exactly. Eg.
my $sympred = App::Chart::Sympred::Equal->new ('FOO.BAR')
Return a new App::Chart::Sympred object which matches the given symbol suffix. Eg.
my $sympred = App::Chart::Sympred::Suffix->new ('.FOO')
Return a new App::Chart::Sympred object which matches the given symbol prefix. Eg.
my $sympred = App::Chart::Sympred::Prefix->new ('^NZ')
Return a new App::Chart::Sympred object which matches the given regexp pattern. Eg.
my $sympred = App::Chart::Sympred::Regexp->new (qr/^\^BV|\.SA$/);
Return a new App::Chart::Sympred object which calls the given proc subroutine to test for a match. Eg.
proc
sub my_fancy_test { my ($symbol) = @_; return (some zany test on $symbol); } my $sympred = App::Chart::Sympred::Proc->new (\&my_fancy_test);
Return a new App::Chart::Sympred object which is true if any of the given $pred predicates is true. Eg.
$pred
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);
Add additional predicates to a App::Chart::Sympred::Any object.
App::Chart::Sympred::Any
To install two_face, copy and paste the appropriate command in to your terminal.
cpanm
cpanm two_face
CPAN shell
perl -MCPAN -e shell install two_face
For more information on module installation, please visit the detailed CPAN module installation guide.