-
-
17 May 2022 21:06:21 UTC
- Distribution: App-Netdisco
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (20)
- Testers
- Kwalitee
Bus factor: 1- 74.63% Coverage
- License: bsd
- Activity
24 month- Tools
- Download (4.29MB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Algorithm::Cron
- AnyEvent
- AnyEvent::DNS::EtcHosts
- App::cpanminus
- App::local::lib::helper
- Archive::Extract
- Authen::Radius
- Authen::TacacsPlus
- CGI::Expand
- Command::Runner
- DBD::Pg
- DBIx::Class
- DBIx::Class::Helpers
- Daemon::Control
- Dancer
- Dancer::Plugin::Auth::Extensible
- Dancer::Plugin::DBIC
- Dancer::Plugin::Passphrase
- Dancer::Plugin::Swagger
- Dancer::Session::Cookie
- Data::Printer
- Data::Visitor::Tiny
- EV
- Expect
- File::Path
- File::ShareDir
- File::Slurper
- File::Spec::Functions
- Guard
- HTML::Parser
- HTTP::Tiny
- IO::Socket::INET6
- IO::Socket::SSL
- JSON
- JSON::PP
- JSON::XS
- List::MoreUtils
- List::Util
- MCE
- MIME::Base64
- Module::Load
- Moo
- Net::DNS
- Net::Domain
- Net::LDAP
- Net::OpenSSH
- NetAddr::IP
- NetAddr::MAC
- Opcode
- Package::DeprecationManager
- Path::Class
- Plack
- Plack::Handler::Twiggy
- Plack::Middleware::Debug
- Plack::Middleware::Expires
- Plack::Middleware::Headers
- Plack::Middleware::ReverseProxy
- Pod::Usage
- Regexp::Common
- Role::Tiny
- SNMP::Info
- SQL::Abstract
- SQL::Translator
- Scope::Guard
- Sereal
- Session::Storage::Secure
- Socket6
- Starman
- Storable
- Sub::Util
- Sys::SigAction
- Template
- Template::AutoFilter
- Template::Plugin::CSV
- Template::Plugin::Number::Format
- Term::ReadLine
- Term::UI
- Try::Tiny
- URI
- URI::Based
- URL::Encode
- URL::Encode::XS
- YAML
- YAML::XS
- aliased
- autovivification
- namespace::clean
- version
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
App::Netdisco::Util::Web
DESCRIPTION
A set of helper subroutines to support parts of the Netdisco application.
There are no default exports, however the
:all
tag will export all subroutines.EXPORT_OK
request_is_api
Client has requested JSON format data and an endpoint under
/api
.request_is_api_report
Same as
request_is_api
but also requires path to start "/api/v1/report/...
".request_is_api_search
Same as
request_is_api
but also requires path to start "/api/v1/search/...
".sql_match( $value, $exact? )
Convert wildcard characters "
*
" and "?
" to "%
" and "_
" respectively.Pass a true value to
$exact
to only substitute the existing wildcards, and not also add "*
" to each end of the value.In list context, returns two values, the translated value, and also an SQL::Abstract LIKE clause.
sort_port( $a, $b )
Sort port names of various types used by device vendors. Interface is as Perl's own
sort
- two input args and an integer return value.sort_modules( $modules )
Sort devices modules into tree hierarchy based upon position and parent - input arg is module list.
interval_to_daterange( $interval )
Takes an interval in days, weeks, months, or years in a format like '7 days' and returns a date range in the format 'YYYY-MM-DD to YYYY-MM-DD' by subtracting the interval from the current date.
If
$interval
is not passed, epoch zero (1970-01-01) is used as the start.Module Install Instructions
To install App::Netdisco, copy and paste the appropriate command in to your terminal.
cpanm App::Netdisco
perl -MCPAN -e shell install App::Netdisco
For more information on module installation, please visit the detailed CPAN module installation guide.