File Coverage

blib/lib/STIX/Marking/TLP/Red.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 31 31 100.0


line stmt bran cond sub pod time code
1             package STIX::Marking::TLP::Red;
2              
3 24     24   486 use 5.010001;
  24         111  
4 24     24   179 use strict;
  24         57  
  24         756  
5 24     24   132 use warnings;
  24         48  
  24         1422  
6 24     24   186 use utf8;
  24         48  
  24         183  
7              
8 24     24   1123 use STIX::Common::Timestamp;
  24         56  
  24         813  
9              
10 24     24   153 use Moo;
  24         77  
  24         168  
11             extends 'STIX::Common::MarkingDefinition';
12              
13 24     24   11708 use constant MARKING_TYPE => 'tlp';
  24         63  
  24         1948  
14              
15 24         5448 use constant SCHEMA =>
16 24     24   182 'https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/marking-definition.json#/definitions/tlp_red';
  24         81  
17              
18             has +id => (is => 'ro', default => 'marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed');
19             has +created => (is => 'ro', default => sub { STIX::Common::Timestamp->new('2017-01-20T00:00:00') });
20             has +name => (is => 'ro', default => 'TLP:RED');
21             has +definition_type => (is => 'ro', default => 'tlp');
22             has +definition => (is => 'ro', default => sub { {tlp => 'red'} });
23              
24             1;
25              
26             =encoding utf-8
27              
28             =head1 NAME
29              
30             STIX::Marking::TLP::Red - STIX TLP:RED marking Statement marking
31              
32             =head1 SYNOPSIS
33              
34             use STIX::Marking::TLP::Red;
35              
36             my $tlp = STIX::Marking::TLP::Red->new();
37              
38              
39             =head1 DESCRIPTION
40              
41             The marking-definition object representing Traffic Light Protocol (TLP)
42             Red.
43              
44              
45             =head2 METHODS
46              
47             L inherits all methods from L
48             and implements the following new ones.
49              
50             =over
51              
52             =item STIX::Marking::TLP::Red->new(%properties)
53              
54             Create a new instance of L.
55              
56             =item $tlp->created
57              
58             =item $tlp->definition
59              
60             =item $tlp->definition_type
61              
62             =item $tlp->id
63              
64             =item $tlp->name
65              
66             =back
67              
68              
69             =head2 HELPERS
70              
71             =over
72              
73             =item $tlp->TO_JSON
74              
75             Helper for JSON encoders.
76              
77             =item $tlp->to_hash
78              
79             Return the object HASH.
80              
81             =item $tlp->to_string
82              
83             Encode the object in JSON.
84              
85             =item $tlp->validate
86              
87             Validate the object using JSON Schema (see L).
88              
89             =back
90              
91              
92             =head1 SUPPORT
93              
94             =head2 Bugs / Feature Requests
95              
96             Please report any bugs or feature requests through the issue tracker
97             at L.
98             You will be notified automatically of any progress on your issue.
99              
100             =head2 Source Code
101              
102             This is open source software. The code repository is available for
103             public review and contribution under the terms of the license.
104              
105             L
106              
107             git clone https://github.com/giterlizzi/perl-STIX.git
108              
109              
110             =head1 AUTHOR
111              
112             =over 4
113              
114             =item * Giuseppe Di Terlizzi
115              
116             =back
117              
118              
119             =head1 LICENSE AND COPYRIGHT
120              
121             This software is copyright (c) 2024 by Giuseppe Di Terlizzi.
122              
123             This is free software; you can redistribute it and/or modify it under
124             the same terms as the Perl 5 programming language system itself.
125              
126             =cut