| 1 | package Plack::Middleware::Acme::PHPE9568F34::D428::11d2::A769::00AA001ACF42; | ||||||||||
| 2 | { | ||||||||||
| 3 | 1 | $Plack::Middleware::Acme::PHPE9568F34::D428::11d2::A769::00AA001ACF42::VERSION = '3.141000'; | |||||||||
| 4 | } | ||||||||||
| 5 | |||||||||||
| 6 | # ABSTRACT: Implement PHP's best features with PSGI! | ||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use MIME::Base64; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | ▶ | use Data::Section -setup; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 0 | ▶ | my $get_image = sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 15 | 0 | my ($self, $section) = @_; | |||||||||
| 16 | |||||||||||
| 17 | 0 | my $data = ${$self->section_data($section)}; | |||||||||
| 18 | 0 | $data =~ s/^\s+//mg; | |||||||||
| 19 | 0 | $data =~ s/\s+$//mg; | |||||||||
| 20 | 0 | decode_base64($data) | |||||||||
| 21 | 1 | }; | |||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | sub sillies { | ||||||||
|
Subroutine
sillies: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 24 | 0 | my $self = shift; | |||||||||
| 25 | |||||||||||
| 26 | ( | ||||||||||
| 27 | 0 | '=PHPE9568F34-D428-11d2-A769-00AA001ACF42' => $self->$get_image('logo'), | |||||||||
| 28 | '=PHPE9568F35-D428-11d2-A769-00AA001ACF42' => $self->$get_image('zend'), | ||||||||||
| 29 | '=PHPE9568F36-D428-11d2-A769-00AA001ACF42' => $self->$get_image('child'), | ||||||||||
| 30 | ) | ||||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 1 | ▶ | use base 'Plack::Middleware'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | sub call { | ||||||||
|
Subroutine
call: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 36 | 0 | my($self, $env) = @_; | |||||||||
| 37 | |||||||||||
| 38 | 0 | my %responses = $self->sillies; | |||||||||
| 39 | 0 | ▶ | if (my $ret = $responses{$env->{QUERY_STRING}}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | 0 | return [ 200, [ | |||||||||
| 41 | 'Content-Type' => 'image/gif', | ||||||||||
| 42 | 'X-PHP-SUX' => '1', | ||||||||||
| 43 | ], [ $ret ] ] | ||||||||||
| 44 | } else { | ||||||||||
| 45 | 0 | return $self->app->($env); | |||||||||
| 46 | } | ||||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | 1 | 1; | |||||||||
| 50 | |||||||||||
| 51 | =pod | ||||||||||
| 52 | |||||||||||
| 53 | =head1 NAME | ||||||||||
| 54 | |||||||||||
| 55 | Plack::Middleware::Acme::PHPE9568F34::D428::11d2::A769::00AA001ACF42 - Implement PHP's best features with PSGI! | ||||||||||
| 56 | |||||||||||
| 57 | =head1 VERSION | ||||||||||
| 58 | |||||||||||
| 59 | version 3.141000 | ||||||||||
| 60 | |||||||||||
| 61 | =head1 SYNOPSIS | ||||||||||
| 62 | |||||||||||
| 63 | builder { | ||||||||||
| 64 | enable 'Plack::Middleware::Acme::PHPE9568F34::D428::11d2::A769::00AA001ACF42'; | ||||||||||
| 65 | $app; | ||||||||||
| 66 | } | ||||||||||
| 67 | |||||||||||
| 68 | =head1 DESCRIPTION | ||||||||||
| 69 | |||||||||||
| 70 | Who in the Perl community doesn't envy PHP's | ||||||||||
| 71 | L<awesome features|http://phpsadness.com/?page=sad/11>? This module will give | ||||||||||
| 72 | you the features you've always hoped and dreamed for! | ||||||||||
| 73 | |||||||||||
| 74 | =head1 AUTHOR | ||||||||||
| 75 | |||||||||||
| 76 | Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> | ||||||||||
| 77 | |||||||||||
| 78 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 79 | |||||||||||
| 80 | This software is copyright (c) 2012 by Arthur Axel "fREW" Schmidt. | ||||||||||
| 81 | |||||||||||
| 82 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 83 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 84 | |||||||||||
| 85 | =cut | ||||||||||
| 86 | |||||||||||
| 87 | __DATA__ | ||||||||||