Term::Spark
Displays beautiful graphs to use in the terminal
Returns a string with a single utf8 bar according to the value
Term::Spark::show_bar($value_for_this_bar, $max_value);
Returns a string with a bunch of utf8 bars according to the values
Term::Spark::show_graph('max' => $max_value, 'values' => \@values);
Example:
A script to capture args or STDIN and print a graph: use Term::Spark; chomp( @ARGV = <STDIN> ) unless @ARGV; my @list = sort { $a <=> $b } @ARGV; print Term::Spark::show_graph( 'max' => $list[-1], 'values' => \@ARGV, );
Term::Spark - Perl extension for dispaying bars in the terminal
Original idea: https://github.com/holman/spark
Gil Gonçalves <lurst@cpan.org>
This software is copyright (c) 2013 by Gil Gonçalves.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Term::Spark, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Term::Spark
CPAN shell
perl -MCPAN -e shell install Term::Spark
For more information on module installation, please visit the detailed CPAN module installation guide.