lib/DateTime/Format/Lite/PP.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 23 / 23 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« DateTime-Format-Lite.xs ↑ Summary
1 ##----------------------------------------------------------------------------
2 ## DateTime Format Lite - ~/lib/DateTime/Format/Lite/PP.pm
3 ## Version v0.1.0
4 ## Copyright(c) 1 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2026/04/15
7 ## Modified 2026/04/15
8 ## All rights reserved
9 ##
10 ##
11 ## This program is free software; you can redistribute it and/or modify it
12 ## under the same terms as Perl itself.
13 ##----------------------------------------------------------------------------
14 # Pure-Perl fallback for the DateTime::Format::Lite XS layer.
15 # Loaded automatically by DateTime::Format::Lite when XSLoader fails, such as
16 # during development or on platforms without a C compiler, or when the
17 # PERL_DATETIME_FORMAT_LITE_PP environment variable is set to a true value.
18 #
19 # The two functions that are otherwise provided by XS:
20 #
21 # _match_and_extract( self, regex, fields_aref, string )
22 # format_datetime( self, dt )
23 #
24 # both have their pure-Perl equivalents inline in DateTime::Format::Lite (guarded by
25 # the $IsPurePerl flag), so this module's sole responsibility is to ensure that
26 # $IsPurePerl is set to 1 so those paths are taken.
27 # Nothing needs to be injected into the DateTime::Format::Lite namespace.
28 ##----------------------------------------------------------------------------
29 package DateTime::Format::Lite::PP;
30 BEGIN
31 1 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
32 1 ▶ use v5.10.1;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 1 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
35 1 our $VERSION = 'v0.1.0';
36 };
37  
38 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
39 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
40  
41 1 $DateTime::Format::Lite::IsPurePerl = 1;
42  
43 1 1;
44 # NOTE: POD
45 __END__
« DateTime-Format-Lite.xs ↑ Summary