File Coverage

blib/lib/STIX/Common/KillChainPhase.pm
Criterion Covered Total %
statement 26 26 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod n/a
total 35 35 100.0


line stmt bran cond sub pod time code
1             package STIX::Common::KillChainPhase;
2              
3 24     24   555 use 5.010001;
  24         146  
4 24     24   221 use strict;
  24         101  
  24         770  
5 24     24   124 use warnings;
  24         57  
  24         1374  
6 24     24   209 use utf8;
  24         146  
  24         273  
7              
8 24     24   1340 use Types::Standard qw(Str);
  24         85  
  24         303  
9              
10 24     24   91401 use Moo;
  24         74  
  24         216  
11 24     24   11888 use namespace::autoclean;
  24         91  
  24         299  
12              
13             extends 'STIX::Object';
14              
15 24         2257 use constant SCHEMA =>
16 24     24   2809 'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/kill-chain-phase.json';
  24         62  
17              
18 24     24   166 use constant PROPERTIES => qw(kill_chain_name phase_name);
  24         119  
  24         3827  
19              
20             has kill_chain_name => (is => 'rw', required => 1, isa => Str);
21             has phase_name => (is => 'rw', required => 1, isa => Str);
22              
23             1;
24              
25             =encoding utf-8
26              
27             =head1 NAME
28              
29             STIX::Common::KillChainPhase - STIX Kill Chain Phase
30              
31             =head1 SYNOPSIS
32              
33             use STIX::Common::KillChainPhase;
34              
35             my $kill_chain_phase = STIX::Common::KillChainPhase->new();
36              
37              
38             =head1 DESCRIPTION
39              
40             The C represents a phase in a kill chain.
41              
42              
43             =head2 METHODS
44              
45             L inherits all methods from L
46             and implements the following new ones.
47              
48             =over
49              
50             =item STIX::Common::KillChainPhase->new(%properties)
51              
52             Create a new instance of L.
53              
54             =item $kill_chain_phase->kill_chain_name
55              
56             The name of the kill chain.
57              
58             =item $kill_chain_phase->phase_name
59              
60             The name of the phase in the kill chain.
61              
62             =back
63              
64              
65             =head2 HELPERS
66              
67             =over
68              
69             =item $kill_chain_phase->TO_JSON
70              
71             Helper for JSON encoders.
72              
73             =item $kill_chain_phase->to_hash
74              
75             Return the object HASH.
76              
77             =item $kill_chain_phase->to_string
78              
79             Encode the object in JSON.
80              
81             =item $kill_chain_phase->validate
82              
83             Validate the object using JSON Schema (see L).
84              
85             =back
86              
87              
88             =head1 SUPPORT
89              
90             =head2 Bugs / Feature Requests
91              
92             Please report any bugs or feature requests through the issue tracker
93             at L.
94             You will be notified automatically of any progress on your issue.
95              
96             =head2 Source Code
97              
98             This is open source software. The code repository is available for
99             public review and contribution under the terms of the license.
100              
101             L
102              
103             git clone https://github.com/giterlizzi/perl-STIX.git
104              
105              
106             =head1 AUTHOR
107              
108             =over 4
109              
110             =item * Giuseppe Di Terlizzi
111              
112             =back
113              
114              
115             =head1 LICENSE AND COPYRIGHT
116              
117             This software is copyright (c) 2024 by Giuseppe Di Terlizzi.
118              
119             This is free software; you can redistribute it and/or modify it under
120             the same terms as the Perl 5 programming language system itself.
121              
122             =cut