Image-Shoehorn-Gallery

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
($[ >= 5.005) ?
(AUTHOR   => 'Aaron Straup Cope (cpan@aaronland.net)',
 ABSTRACT => '') : (),
'VERSION_FROM' => 'lib/Image/Shoehorn/Gallery.pm',
'PREREQ_PM'    => {
                   Image::Shoehorn                   => '1.41',
                   Image::Size                       => '2.99',
                   Image::Info                       => '1.11',
                   Image::IPTCInfo                   => '1.6',
                   XML::SAX::Machines                => '0.34',
                   XML::Filter::XML_Directory_2XHTML => '1.3.1',
                   XML::Filter::XSLT                 => '0.03',
                   File::Basename                    => 0,
                   File::Copy                        => 0,
                   File::Path                        => 0,
                   DirHandle                         => 0,
                   IO::File                          => 0,
                   Carp                              => 0,
                   Digest::MD5                       => 0,
 
                   # for testing

lib/Image/Shoehorn/Gallery.pm  view on Meta::CPAN

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
    <!-- lots of foofy design stuff -->
 
   </body>
  </html>
  </xsl:template>
 
 </xsl:stylesheet>
 
=item *
 
Generates valid XHTML (strict) and CSS!
 
=back
 
=cut
 
use strict;
 
$Image::Shoehorn::Gallery::VERSION = '0.22';

lib/Image/Shoehorn/Gallery.pm  view on Meta::CPAN

894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
my $machine = Pipeline(
                       "LocalSAX_FloatingThumbs",
                       "LocalSAX_Breadcrumbs",
                       ((scalar(@{$filters})) ? @{$filters} : ()),
                       $writer);
 
#
 
# This is broken, I know.
# There appears to be some degree of funkiness going
# on with the inheritance chain for 2XHTML that is
# preventing the SAX::Machine from getting the output
# of 2XHTML and passing it on to $writer. I think, anyway.
 
my $xhtml = XML::Filter::XML_Directory_2XHTML->new(Handler=>$machine);
 
$xhtml->debug(0);
 
if ($encoding) {
  $xhtml->set_encoding($encoding);
}
 
if ($lang) {

lib/Image/Shoehorn/Gallery.pm  view on Meta::CPAN

1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
use base https://metacpan.org/pod/qw (XML::SAX::Base);">qw (XML::SAX::Base);
 
use File::Basename;
use Image::Size qw (imgsize);
use Image::Info;
 
my $possible_views;
 
use constant DTD_HTML_ROOT     => "html";
use constant DTD_HTML_PUBLICID => "-//W3C//DTD XHTML 1.0 Strict//EN";
 
sub xml_decl {
  my $self = shift;
  $self->SUPER::xml_decl({
                          Version  => "1.0",
                          Encoding => (Image::Shoehorn::Gallery->encoding() || "UTF-8")
                         });
 
  # If you're wondering what is going on here,

lib/Image/Shoehorn/Gallery.pm  view on Meta::CPAN

2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
sub data {
  if ($data) { return $data; }
  while (<DATA>) { $data .= $_;  }
  return $data;
}
 
return 1;
 
# NOTE : we are not setting the public and system doctypes here
# because they cause even more weirdness with XML::LibXML and it's
# seeming inability to deal with XHTML files. I really don't get
# what's going on so we play a little game and set them event the
# xml_decl event in the LocalSAX_Image filter is called next. Gah!
 
# NOTE ALSO : that this is also where we happen to set the encoding
 
__DATA__
<?xml version="1.0" encoding='iso-8859-1'?>
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version = "1.0" >



( run in 1.683 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )