File Coverage

blib/lib/STIX/Marking/TLP/White.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::White;
2              
3 24     24   575 use 5.010001;
  24         105  
4 24     24   166 use strict;
  24         51  
  24         1028  
5 24     24   162 use warnings;
  24         55  
  24         1480  
6 24     24   164 use utf8;
  24         75  
  24         205  
7              
8 24     24   1236 use STIX::Common::Timestamp;
  24         64  
  24         940  
9              
10 24     24   178 use Moo;
  24         82  
  24         232  
11             extends 'STIX::Common::MarkingDefinition';
12              
13 24     24   12131 use constant MARKING_TYPE => 'tlp';
  24         66  
  24         2167  
14              
15 24         5566 use constant SCHEMA =>
16 24     24   177 'https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/marking-definition.json#/definitions/tlp_white';
  24         65  
17              
18             has +id => (is => 'ro', default => 'marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9');
19             has +created => (is => 'ro', default => sub { STIX::Common::Timestamp->new('2017-01-20T00:00:00') });
20             has +name => (is => 'ro', default => 'TLP:WHITE');
21             has +definition_type => (is => 'ro', default => 'tlp');
22             has +definition => (is => 'ro', default => sub { {tlp => 'white'} });
23              
24             1;
25              
26             =encoding utf-8
27              
28             =head1 NAME
29              
30             STIX::Marking::TLP::White - STIX TLP:WHITE Statement marking
31              
32             =head1 SYNOPSIS
33              
34             use STIX::Marking::TLP::White;
35              
36             my $tlp = STIX::Marking::TLP::White->new();
37              
38              
39             =head1 DESCRIPTION
40              
41             The marking-definition object representing Traffic Light Protocol (TLP)
42             White.
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::White->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
127