summaryrefslogtreecommitdiff
path: root/lib/Config/Tree/Node/Null.pm
blob: f03e7a1aa095a7ff4b82f8131635a132e1a162f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package Config::Tree::Node::Null;
use parent 'Config::Tree::Node';
use strict;
use warnings;
use Carp;

sub is_null { 1 }

our $AUTOLOAD;

sub AUTOLOAD {
    my $self = shift;
    my $key = $AUTOLOAD;
    $key =~ s/.*:://;
    if ($key =~ s/^([A-Z])(.*)/\l$1$2/) {
	return $self;
    }
    confess "Can't locate method $AUTOLOAD";
}

sub as_string { '(null)' }

use overload
    bool => sub { 0 };

1;

Return to:

Send suggestions and report system problems to the System administrator.