HTML-Bricks
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my %prereqs = (
Apache::Constants => [ 0.01, 'Apache::Constants comes with mod_perl (perl.apache.org)' ],
Apache::Cookie => [ 0.01, 'Apache::Cookie can be found on CPAN (search.cpan.org)' ],
Apache::Session => [ 1.53, 'Apache::Session can be found on CPAN (search.cpan.org)' ],
Apache::Request => [ 0.01, 'Apache::Request comes with mod_perl (perl.apache.org)' ],
Apache::Util => [ 0.01, 'Apache::Util comes with mod_perl (perl.apache.org)' ],
Apache::File => [ 0.01, 'Apache::File comes with mod_perl (perl.apache.org)' ],
HTML::Mason => [ 1.00, 'HTML::Mason can be obtained from www.masonhq.com' ],
HTML::Parser => [ 0.01, 'HTML::Parser can be found on CPAN (search.cpan.org)' ],
HTML::Tagset => [ 0.01, 'HTML::Tagset can be found on CPAN (search.cpan.org)' ],
Image::Magick => [ 5.28, 'Photo albums require Image::Magick; Image::Magick can be found on CPAN (search.cpan.org)'],
Digest::MD5 => [ 0.01, 'Digest::MD5 can be found on CPAN (search.cpan.org)' ],
MD5 => [ 0.01, 'MD5 can be found on CPAN (search.cpan.org)' ],
MIME::Base64 => [ 0.01, 'MIME::Base64 can be found on CPAN (search.cpan.org)' ],
Storable => [ 0.01, 'Storable can be found on CPAN (search.cpan.org)' ],
Data::Dumper => [ 0.01, 'Data::Dumper can be found on CPAN (search.cpan.org)' ]
);
my %simple_prereqs;
foreach (sort keys %prereqs) {
lib/HTML/Bricks.pm view on Meta::CPAN
%session = %h;
$session_id = undef;
$ruser = undef;
@discarded_rassemblies = ();
$rmatches = undef;
#
# Check for URIs handled Bricks::Magick
#
# Wrapped in Eval because we want Bricks to mostly work even if the user
# hasn't installed Image::Magick
#
eval {
require "HTML/Bricks/Magick.pm";
return OK if HTML::Bricks::Magick::handler(@_) == OK;
};
#
# Not a picture to be modified
#
lib/HTML/Bricks/Magick.pm view on Meta::CPAN
qw(AddNoise Blur Border Charcoal Chop
Contrast Crop Colorize Comment CycleColormap
Despeckle Draw Edge Emboss Enhance Equalize Flip Flop
Frame Gamma Implode Label Layer Magnify Map Minify
Modulate Negate Normalize OilPaint Opaque Quantize
Raise ReduceNoise Resize Rotate Sample Scale Segment Shade
Sharpen Shear Solarize Spread Swirl Texture Transparent
Threshold Trim Wave Zoom);
sub handler {
use Image::Magick;
my $r = shift;
return DECLINED unless $r->filename =~ /.*\.[jJ][pP][eE]?[gG]/;
# get the name of the requested file
my $file = $r->filename;
# If the file exists and there are no transformation arguments
# just decline the transaction. It will be handled as usual.
lib/HTML/Bricks/Magick.pm view on Meta::CPAN
if ($mtime_cached == $mtime_source) {
my $fh = Apache::gensym();
open ($fh, $cached) || return NOT_FOUND;
$r->send_fd($fh);
close($fh);
return OK;
}
}
# Read the image
my $q = Image::Magick->new;
my $err = $q->Read($source);
# Conversion arguments and image filter operations are kept in
# the query string.
my %arguments;
my @filters = split("&",$args);
foreach (@filters) {
my @fields = split(':', $_);
( run in 1.089 second using v1.01-cache-2.11-cpan-beeb90c9504 )