blib/lib/CXC/Astro/Regions/CFITSIO/Types.pm

filter: Statementstmt 100% 31 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 100% 39 / 39 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/CXC/Astro/Regions.pm ↑ Summary blib/lib/CXC/Astro/Regions/CIAO/Types.pm »
1 package CXC::Astro::Regions::CFITSIO::Types;
2  
3 # ABSTRACT: Types for CFITSIO Regions
4  
5 3 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 our $VERSION = '0.03';
9  
10 3 ▶use Types::Standard qw( Enum Bool Num Str StrMatch );
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶use Types::Common::Numeric qw( PositiveNum );
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 ▶use Type::Utils -all;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 3 ▶use Regexp::Common qw( number );
Subroutine BEGIN: called CC=1 SCAR=0.0
15 use Type::Library
16 3 -base,
17 -extends => [ 'Types::Common::Numeric', 'Types::Common::String', 'Types::Standard' ],
18 -declare => qw(
19 Angle
20 Length
21 PositionAsNum
22 Vertex
23 XPosition
24 YPosition
25 3 ▶ );
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 3 ▶use CXC::Types::Astro::Coords 'Sexagesimal';
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 3 declare PositionAsNum,
30 as StrMatch [qr{\A (?: $RE{num}{real} [d]?) \z}x];
31  
32  
33 3 declare XPosition, as PositionAsNum | Sexagesimal [ -ra, -sep ];
34 3 declare YPosition, as PositionAsNum | Sexagesimal [ -dec, -sep ];
35 3 declare Vertex, as Tuple [ XPosition, YPosition ];
36  
37 3 declare Length, as StrMatch [qr/\A$RE{num}{real} (['"dp])?\z/x];
38  
39 3 declare Angle, as Num;
40  
41 3 1;
42  
43 #
44 # This file is part of CXC-Astro-Regions
45 #
46 # This software is Copyright (c) 2023 by Smithsonian Astrophysical Observatory.
47 #
48 # This is free software, licensed under:
49 #
50 # The GNU General Public License, Version 3, June 2007
51 #
52  
53 __END__
« blib/lib/CXC/Astro/Regions.pm ↑ Summary blib/lib/CXC/Astro/Regions/CIAO/Types.pm »