FusionInventory::Agent::Tools - OS-independent generic functions
This module provides some OS-independent generic functions.
Returns a formated date from given Unix timestamp.
Returns a formated date from given date elements.
Returns a normalized manufacturer value for given one.
Returns a normalized speed value (in Mhz) for given one.
Returns a normalized network interface speed value (in Mb/s) for given one.
Returns a normalized size value (in Mb) for given one.
Returns the input stripped from any control character, properly encoded in UTF-8.
Returns the input properly encoded in UTF-8.
Remove leading and trailing whitespace, and fold multiple whitespace characters into a single one.
Returns true if software with given major and minor version meet minimal version requirements.
Returns an open file handle on either a command output, or a file.
Returns an open file handle on either a command output, a file, or a string.
Returns the first line of given command output or given file content, with end of line removed.
Returns all the lines of given command output or given file content, as a list of strings with end of line removed in list context, as a single string otherwise.
Returns the result of applying given pattern on the first matching line of given command output or given file content.
Returns the last line of given command output or given file content.
Returns the number of lines of given command output or given file content.
Returns true if given binary can be executed.
Returns true if given file can be read.
Returns true if given perl module can be loaded (and actually loads it).
Returns the value converted to a character if it starts with hexadecimal prefix, the unconverted value otherwise. Eg. 0x41 -> A, 41 -> 41.
Returns the value converted to a decimal if it starts with hexadecimal prefix, the unconverted value otherwise. Eg. 0x41 -> 65, 41 -> 41.
Returns the value converted to an hexadecimal if it doesn't start with hexadecimal prefix, the unconverted value otherwise. Eg. 65 -> 0x41, 0x41 -> 0x41.
Returns a true value if any item in LIST meets the criterion given through BLOCK.
Returns the first value from LIST meeting the criterion given through BLOCK or undef.
Returns a true value if all items in LIST meet the criterion given through BLOCK.
Returns a true value if no item in LIST meets the criterion given through BLOCK.
Returns a new list by stripping duplicate values in LIST.
Converts a perl file name to a perl module name (Foo/Bar.pm -> Foo::Bar)
Converts a perl module name to a perl file name ( Foo::Bar -> Foo/Bar.pm)
Run a function whose name is computed at runtime and return its result.
Wait for $second. It uses sleep() or Win32::Sleep() depending on the Operating System.
Return the content of a given file.
Return if $hash has a key $paramName which value is a ARRAY ref not empty.
To install FusionInventory::Agent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FusionInventory::Agent
CPAN shell
perl -MCPAN -e shell install FusionInventory::Agent
For more information on module installation, please visit the detailed CPAN module installation guide.