lib/Net/API/REST/Cookie.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 27 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Net/API/REST.pm ↑ Summary lib/Net/API/REST/Cookies.pm »
1 ##----------------------------------------------------------------------------
2 ## REST API Framework - ~/lib/Net/API/REST/Cookie.pm
3 ## Version v1.0.0
4 ## Copyright(c) 2022 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2019/10/08
7 ## Modified 2023/06/10
8 ## All rights reserved
9 ##
10 ## This program is free software; you can redistribute it and/or modify it
11 ## under the same terms as Perl itself.
12 ##----------------------------------------------------------------------------
13 package Net::API::REST::Cookie;
14 BEGIN
15 {
16 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶ use parent qw( Cookie );
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 1 ▶ our $VERSION = 'v1.0.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
21 };
22  
23 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 1 1;
27 # NOTE: pod
28 __END__
29  
30 =encoding utf8
31  
32 =head1 NAME
33  
34 Net::API::REST::Cookie - Cookie Object
35  
36 =head1 SYNOPSIS
37  
38 use Net::API::REST::Cookies;
39 my $cookie = Net::API::REST::Cookie->new(
40 name => 'my-cookie',
41 domain => 'example.com',
42 value => 'sid1234567',
43 path => '/',
44 expires => '+10D',
45 # or alternatively
46 maxage => 864000
47 # to make it exclusively accessible by regular http request and not ajax
48 http_only => 1,
49 # should it be used under ssl only?
50 secure => 1,
51 request => $request_obj, # Net::API::REST::Request object
52 );
53  
54 =head1 VERSION
55  
56 v1.0.0
57  
58 =head1 DESCRIPTION
59  
60 This module represents a cookie. This can be used as a standalone module, or can be managed as part of the cookie jar L<Cookie::Jar>
61  
62 This module inherits all of its methods from L<Cookie>. Please check its documentation directly.
63  
64 =head1 AUTHOR
65  
66 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
67  
68 =head1 SEE ALSO
69  
70 L<Cookie>, L<Cookie::Jar>
71  
72 =head1 COPYRIGHT & LICENSE
73  
74 Copyright (c) 2018-2023 DEGUEST Pte. Ltd.
75  
76 You can use, copy, modify and redistribute this package and associated
77 files under the same terms as Perl itself.
78  
79 =cut
« lib/Net/API/REST.pm ↑ Summary lib/Net/API/REST/Cookies.pm »