Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
Config::AST::Node::Value(3) User Contributed Perl Documentation Config::AST::Node::Value(3)

Config::AST::Node::Value - simple statement node

Implements a simple statement node. Simple statement is always associated with a value, hence the class name.

Returns the value associated with the statement.

If value is a code reference, it is invoked without arguments, and its return is used as value.

If the value is a reference to a list or hash, the return depends on the context. In scalar context, the reference itself is returned. In list context, the array or hash is returned.

Returns false.

Returns the node value, converted to string.

Returns the node value, converted to number.

If the value is an array, returns number of elements in the array. If the value is a hash, returns number of keys. Otherwise, returns the value itself.

Depending on the context in which it is used, the Config::AST::Node::Value is coerced to the most appropriate data type. For example, in the following expression;

   if ($cf->getnode('offset') < 10) {

the value will be coerced to a number prior to comparison. This means that in most cases you don't need to explicitly invoke the value method.

Config::AST, Config::AST::Node.
2019-08-28 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.