File: example.pl

package info (click to toggle)
libconfigreader-simple-perl 1.29-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 220 kB
  • ctags: 27
  • sloc: perl: 657; makefile: 2
file content (18 lines) | stat: -rwxr-xr-x 442 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl -w
#
# Testing ConfigReader::Simple
#
# Last updated by gossamer on Tue Sep  1 22:43:42 EST 1998
#

use ConfigReader::Simple;


my $config = ConfigReader::Simple->new("./example.config", [qw(Test1 Test2)]);

$config->parse();
$config->_validate_keys();  # die if there are keys in example.config 
                            # that aren't declared.

print "The value for directive Test1 is: " . $config->get("Test1") . "\n";