line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Wireguard::WGmeta::Cli::Commands::Help; |
2
|
1
|
|
|
1
|
|
42
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use experimental 'signatures'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
13
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
100
|
use parent 'Wireguard::WGmeta::Cli::Commands::Command'; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
13
|
|
7
|
|
|
|
|
|
|
|
8
|
0
|
|
|
0
|
1
|
|
sub new($class){ |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9
|
0
|
|
|
|
|
|
my $self = {}; |
10
|
0
|
|
|
|
|
|
bless $self, $class; |
11
|
0
|
|
|
|
|
|
return $self; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
0
|
1
|
|
sub entry_point($self) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
$self->cmd_help(); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
1
|
|
sub cmd_help($self) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
print "wg-meta - An approach to add meta data to the Wireguard configuration\n"; |
21
|
0
|
|
|
|
|
|
print "Usage: wg-meta []\n"; |
22
|
0
|
|
|
|
|
|
print "Available subcommands:\n"; |
23
|
0
|
|
|
|
|
|
print "\t show: Shows the current configuration paired with available metadata\n"; |
24
|
0
|
|
|
|
|
|
print "\t set: Sets configuration attributes\n"; |
25
|
0
|
|
|
|
|
|
print "\t enable: Enables a peer\n"; |
26
|
0
|
|
|
|
|
|
print "\t disable: Disables a peer\n"; |
27
|
0
|
|
|
|
|
|
print "\t addpeer: Adds a peer and prints the client config to std_out\n"; |
28
|
0
|
|
|
|
|
|
print "\t removepeer: Removes a peer\n"; |
29
|
0
|
|
|
|
|
|
print "\t apply: Just a shorthand for `wg syncconf <(wg-quick strip )`\n"; |
30
|
0
|
|
|
|
|
|
print "You may pass `help` to any of these subcommands to view their usage\n"; |
31
|
0
|
|
|
|
|
|
exit(); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
1; |