Apache2::ASP::ConfigNode::System - the 'system' portion of the config.


Apache2-ASP documentation Contained in the Apache2-ASP distribution.

Index


Code Index:

NAME

Top

Apache2::ASP::ConfigNode::System - the 'system' portion of the config.

SYNOPSIS

Top

  my $system = $Config->system;

DESCRIPTION

Top

This package provides special access to the elements specific to the system portion of the XML config file.

PUBLIC PROPERTIES

Top

libs

A list of library paths that should be included into @INC.

load_modules

A list of Perl modules that should be loaded automatically.

post_processors

A list of Apache2::ASP::ConfigPostProcessor modules that should be given the ability to alter the config before it is considered "ready for use" by the rest of the application.

env_vars

A hash of %ENV variables that should be set.

settings

A collection of special read-only values that should be available throughout the application.

Examples include encryption keys, API keys and username/password combos to access remote services.

BUGS

Top

It's possible that some bugs have found their way into this release.

Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Apache2-ASP to submit bug reports.

HOMEPAGE

Top

Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Apache2::ASP in action.

AUTHOR

Top

John Drago <jdrago_999@yahoo.com>

COPYRIGHT AND LICENSE

Top


Apache2-ASP documentation Contained in the Apache2-ASP distribution.

package Apache2::ASP::ConfigNode::System;

use strict;
use warnings 'all';
use base 'Apache2::ASP::ConfigNode';
use Apache2::ASP::ConfigNode::System::Settings;


#==============================================================================
sub new
{
  my $class = shift;
  
  my $s = $class->SUPER::new( @_ );
  $s->{settings} = Apache2::ASP::ConfigNode::System::Settings->new( $s->{settings} || { setting => [ ] } );
  
  return $s;
}# end new()


#==============================================================================
sub libs
{
  my $s = shift;
  
  @{ $s->{libs}->{lib} };
}# end libs()

#==============================================================================
sub load_modules
{
  my $s = shift;
  
  @{ $s->{load_modules}->{module} };
}# end libs()

#==============================================================================
sub env_vars
{
  my $s = shift;
  
  @{ $s->{env_vars}->{var} };
}# end libs()

#==============================================================================
sub post_processors
{
  my $s = shift;
  
  @{ $s->{post_processors}->{class} };
}# end libs()


#==============================================================================
sub settings
{
  my $s = shift;
  
  return wantarray ? @{ $s->{settings}->{setting} } : $s->{settings};
}# end settings()

1;# return true: