Apache-GDGraph
view release on metacpan or search on metacpan
0.6 Mon Sep 4 15:16:01 PDT 2000
- Got rid of all cache handling code and now using File::Cache, as I
should have done in the first place.
- PerlSetVar CacheDir is gone (File::Cache uses its own).
- PerlSetVar CacheSize added (size in bytes).
0.5 Sat Sep 2 21:48:18 PDT 2000
- Fixes from Vivek Khera
- Didn't create directory correctly on BSD.
- Use File::Path::mkpath to create directory and untaints graph
type so that module is taint safe.
- Foreach loop syntax didn't work with 5.004.
- Fixed error handling again, now one eval block wrapping handler.
- Added PerlSetVar CacheDir and PerlSetVar Expires to control the
server side cache directory and value of the Expires header in days,
respectively.
- Deletes retrieved files after itself.
- Beginnings of a better test suite.
- Just run pod2text on the module to create README, as opposed to not
having a README I guess.
lib/Apache/GD/Graph.pm view on Meta::CPAN
$r->print($cached_image);
return OK;
}
my $type = delete $args{type} || DEFAULT_TYPE;
my $width = delete $args{width} || DEFAULT_WIDTH;
my $height = delete $args{height} || DEFAULT_HEIGHT;
$type =~ m/^(\w+)$/;
$type = $1; # untaint it!
my @data;
my $i = 1;
my $key = "data$i";
while (exists $args{$key}) {
my ($type, $array, @rest) = (parse delete $args{$key});
if ($type == TYPE_LIST) {
$array = [ $array, @rest ];
}
arrayCheck $key, $array;
lib/Apache/GD/Graph.pm view on Meta::CPAN
no strict 'refs';
require "GD/Graph/$type.pm";
$graph = ('GD::Graph::'.$type)->new($width, $height);
}; if ($@) {
die <<EOF;
Could not create an instance of class GD::Graph::$type: $@
EOF
}
my $to_file = (parseElement delete $args{to_file})[1];
# Untaint it!
($to_file) = ($to_file =~ /([\w.\/]+)/);
for my $option (keys %args) {
my ($type, $value, @rest) = parse ($args{$option});
if (my $method = $graph->can("set_$option")) {
$graph->$method($value, @rest);
} else {
if ($type == TYPE_LIST) {
$value = [ $value, @rest ];
( run in 0.271 second using v1.01-cache-2.11-cpan-4e96b696675 )