Name

getCurrentStatic — retrieves the current configuration variables by name or into a hash reference

Synopsis

my $constants = getCurrentStatic();
my $value = getCurrentStatic($name);

With no parameters, getCurrentStatic retrieves a hash reference of the current configuration variables in the vars table. Though they can be modified, the table will not be updated to reflect changes to hash values or keys. If a $name parameter is provided, this function will return the associated value from the table, if it exists. Otherwise, it will return the undefined value. This is exported from Slash::Utility.

Example

use Slash::Utility;
my $constants = getCurrentStatic();

my $rootdir = getCurrentStatic('rootdir');

Get Running Weblogs with Slash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.