Linux::NFTables - Perl interface to libnftables
my $nft = Linux::NFTables->new()->set_output_options('json'); my $json = $nft->run_cmd("list tables");
This module provides a Perl interface to nftables.
Strings into & out of this module are byte strings.
Instantiates CLASS.
Returns a boolean that indicates whether OBJ is set to dry-run mode.
Sets or unsets dry-run mode in OBJ. If the parameter is not given, this defaults to ON.
Passes an arbitrary command string to nftables and returns its output.
Returns a list of names, e.g., json or guid. Must be called in list context.
json
guid
Possible values are libnftables’s various NFT_CTX_OUTPUT_* constants (minus that prefix).
NFT_CTX_OUTPUT_*
A setter complement to get_output_options().
get_output_options()
Like get_output_options() but for debug options.
Possible values are libnftables’s various NFT_DEBUG_* constants (minux that prefix).
NFT_DEBUG_*
A setter complement to get_debug_options().
get_debug_options()
To install Linux::NFTables, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::NFTables
CPAN shell
perl -MCPAN -e shell install Linux::NFTables
For more information on module installation, please visit the detailed CPAN module installation guide.