Plack-Middleware-XSLT

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Plack::Middleware::XSLT

0.30  2014-10-18
        - Support PSGI streaming
        - Remove dependency on HTTP::Exception
        - Remove dependency on Plack::Response
        - Remove dependency on Test::Deep
        - Minor cleanups

0.20002  2013-05-31
        - Fix tests on Windows
        - Document HTTP::Exception feature

0.20001  2013-05-24

MANIFEST  view on Meta::CPAN

MANIFEST
META.yml
Makefile.PL
README
dist.ini
lib/Plack/Middleware/XSLT.pm
t/cache.t
t/error.t
t/release-pod-coverage.t
t/release-pod-syntax.t
t/streaming.t
t/xml/doc.xml
t/xsl/error.xsl
t/xsl/identity.xsl
t/xsl/import.xsl
t/xsl/import_import.xsl
t/xsl/import_include.xsl
t/xsl/include.xsl
t/xsl/include_import.xsl
t/xsl/include_include.xsl
t/xsl/master.xsl

lib/Plack/Middleware/XSLT.pm  view on Meta::CPAN

                $headers->set('Content-Type', 'text/plain');
                $headers->set('Content-Length', length($message));
                $res->[2] = [ $message ];
            }
            else {
                $headers->set('Content-Length', length($output));
                $res->[2] = [ $output ];
            }
        }
        else {
            # PSGI streaming

            my ($done, @chunks);

            return sub {
                my $chunk = shift;

                return undef if $done;

                if (defined($chunk)) {
                    push(@chunks, $chunk);

t/streaming.t  view on Meta::CPAN

# Wrap with Plack::Middleware::XSLT

my $xslt = Plack::Middleware::XSLT->new(
    path  => 't/xsl',
);
ok($xslt, 'new');

$app = $xslt->wrap($app);
ok($app, 'middleware wrap');

# Test PSGI streaming

test_psgi $app, sub {
    my $cb = shift;

    my ($res, $content);

    $res = $cb->(GET "/doc.xml");
    is($res->decoded_content, qq{<?xml version="1.0"?>\n<doc><elem/></doc>\n},
       'response content');
    is($res->code, 200, 'response code');



( run in 0.341 second using v1.01-cache-2.11-cpan-05444aca049 )