PYX::Hist - Processing PYX data or file and print histogram.
use PYX::Hist; my $obj = PYX::Hist->new(%parameters); $obj->parse($pyx, $out); $obj->parse_file($input_file, $out); $obj->parse_handle($input_file_handler, $out);
new
my $obj = PYX::Hist->new(%parameters);
Constructor.
output_handler
Output handler. Default value is \*STDOUT.
parse
$obj->parse($pyx, $out);
Parse PYX text or array of PYX text and print histogram of PYX input. If $out not present, use 'output_handler'.
$out
Returns undef.
parse_file
$obj->parse_file($input_file, $out);
Parse file with PYX data and print histogram of PYX input. If $out not present, use 'output_handler'.
parse_handler
$obj->parse_handle($input_file_handler, $out);
Parse PYX handler and print histogram of PYX input. If $out not present, use 'output_handler'.
new(): From Class::Utils::set_params(): Unknown parameter '%s'. parse(): Bad end of element. Element: %s Stack has some elements. parse_file(): Bad end of element. Element: %s Stack has some elements. parse_handler(): Bad end of element. Element: %s Stack has some elements.
use strict; use warnings; use PYX::Hist; # Example data. my $pyx = <<'END'; (begin (middle (end -data )end (end -data )end )middle )begin END # PYX::Hist object. my $obj = PYX::Hist->new; # Parse. $obj->parse($pyx); # Output: # [ begin ] 1 # [ end ] 2 # [ middle ] 1
use strict; use warnings; use Error::Pure; use PYX::Hist; # Error output. $Error::Pure::TYPE = 'PrintVar'; # Example data. my $pyx = <<'END'; (begin (middle (end -data )middle )begin END # PYX::Hist object. my $obj = PYX::Hist->new; # Parse. $obj->parse($pyx); # Output: # PYX::Hist: Bad end of element. # Element: middle
use strict; use warnings; use Error::Pure; use PYX::Hist; # Error output. $Error::Pure::TYPE = 'PrintVar'; # Example data. my $pyx = <<'END'; (begin (middle (end -data )end )middle END # PYX::Hist object. my $obj = PYX::Hist->new; # Parse. $obj->parse($pyx); # Output: # PYX::Hist: Stack has some elements.
Class::Utils, Error::Pure, List::Util, PYX::Parser.
Install the PYX modules.
https://github.com/michal-josef-spacek/PYX-Hist
Michal Josef Špaček mailto:skim@cpan.org
http://skim.cz
© 2014-2023 Michal Josef Špaček
BSD 2-Clause License
0.07
To install PYX::Hist, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PYX::Hist
CPAN shell
perl -MCPAN -e shell install PYX::Hist
For more information on module installation, please visit the detailed CPAN module installation guide.