From 9332e5d9d116e313065361cac390048e9524afbf Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Fri, 13 Aug 2010 18:26:59 -0700 Subject: allow Vyatta::Config constructor to set level --- lib/Vyatta/Config.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm index d37d34f..6dfcc46 100755 --- a/lib/Vyatta/Config.pm +++ b/lib/Vyatta/Config.pm @@ -32,12 +32,13 @@ my %fields = ( ); sub new { - my $that = shift; + my ($that, $level) = @_; my $class = ref ($that) || $that; my $self = { %fields, }; bless $self, $class; + $self->{_level} = $level if defined($level); $self->{_cstore} = new Cstore(); return $self; } -- cgit v1.2.3