blib/lib/Yukki/Web/Request.pm

filter: Statementstmt 93.1% 27 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod n/a totaltotal 92.1% 35 / 38 SCAR 0.0
CC
1
Cov
93%
_build_request
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« bin/yukki-passwd ↑ Summary blib/lib/Yukki/TextUtil.pm »
1 package Yukki::Web::Request;
2 5 $Yukki::Web::Request::VERSION = '0.991_002'; # TRIAL
3  
4 5 ▶$Yukki::Web::Request::VERSION = '0.991002';use v5.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 ▶use Plack::Request;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use Type::Utils;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 ▶use Types::Standard qw( HashRef );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 5 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 # ABSTRACT: Yukki request descriptor
15  
16  
17 5 has env => (
18 is => 'ro',
19 isa => HashRef,
20 required => 1,
21 );
22  
23  
24 5 has request => (
25 is => 'ro',
26 isa => class_type('Plack::Request'),
27 required => 1,
28 lazy => 1,
29 builder => '_build_request',
30 handles => [ qw(
31 address remote_host method protocol request_uri path_info path script_name scheme
32 secure body input session session_options logger cookies query_parameters
33 body_parameters parameters content raw_body uri base user headers uploads
34 content_encoding content_length content_type header referer user_agent param
35 upload
36 ) ],
37 );
38  
39 sub _build_request {
40 0 ▶ my $self = shift;
Subroutine _build_request: not called CC=1 SCAR=6.9
41 0 return Plack::Request->new($self->env);
42 }
43  
44  
45 has path_parameters => (
46 is => 'rw',
47 isa => HashRef,
48 required => 1,
49 2 ▶ default => sub { +{} },
Subroutine __ANON__: called CC=1 SCAR=0.0
50 5 );
51  
52 5 1;
53  
54 __END__
55  
56 =pod
57  
58 =encoding UTF-8
59  
60 =head1 NAME
61  
62 Yukki::Web::Request - Yukki request descriptor
63  
64 =head1 VERSION
65  
66 version 0.991_002
67  
68 =head1 DESCRIPTION
69  
70 This is an abstraction that looks astonishingly similar to L<Plack::Request>.
71  
72 =head1 ATTRIBUTES
73  
74 =head2 env
75  
76 This is the PSGI environment. Do not use.
77  
78 =head2 request
79  
80 This is the internal L<Plack::Request> object. Do not use. Use one of the methods delegated to it instead:
81  
82 address remote_host method protocol request_uri path_info path script_name scheme
83 secure body input session session_options logger cookies query_parameters
84 body_parameters parameters content raw_body uri base user headers uploads
85 content_encoding content_length content_type header referer user_agent param
86 upload
87  
88 =head2 path_parameters
89  
90 These are the variables found in the path during dispatch.
91  
92 =head1 AUTHOR
93  
94 Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
95  
96 =head1 COPYRIGHT AND LICENSE
97  
98 This software is copyright (c) 2017 by Qubling Software LLC.
99  
100 This is free software; you can redistribute it and/or modify it under
101 the same terms as the Perl 5 programming language system itself.
102  
103 =cut
« bin/yukki-passwd ↑ Summary blib/lib/Yukki/TextUtil.pm »