diff options
| author | Manuel Traut <manut@mecka.net> | 2011-04-29 09:09:27 +0200 |
|---|---|---|
| committer | Manuel Traut <manut@mecka.net> | 2011-04-29 09:09:27 +0200 |
| commit | 5238ad5a0c4a9e1c8cd036f5de4055e39bd71297 (patch) | |
| tree | 4407c087b9fb5432b1dc11e70b52dacfa0b99feb /beagle/debian-rfs/usr/share/perl5/Debconf/DbDriver/Debug.pm | |
| parent | 60ead65c41afba7e6aa4bbcf507a1d52f7a8fe9f (diff) | |
added debootstrap stuff
Signed-off-by: Manuel Traut <manut@mecka.net>
Diffstat (limited to 'beagle/debian-rfs/usr/share/perl5/Debconf/DbDriver/Debug.pm')
| -rw-r--r-- | beagle/debian-rfs/usr/share/perl5/Debconf/DbDriver/Debug.pm | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/beagle/debian-rfs/usr/share/perl5/Debconf/DbDriver/Debug.pm b/beagle/debian-rfs/usr/share/perl5/Debconf/DbDriver/Debug.pm new file mode 100644 index 0000000..e5af031 --- /dev/null +++ b/beagle/debian-rfs/usr/share/perl5/Debconf/DbDriver/Debug.pm @@ -0,0 +1,52 @@ +#!/usr/bin/perl -w +# This file was preprocessed, do not edit! + + +package Debconf::DbDriver::Debug; +use strict; +use Debconf::Log qw{:all}; +use base 'Debconf::DbDriver'; + + + +use fields qw(db); + + +sub init { + my $this=shift; + + if (! ref $this->{db}) { + $this->{db}=$this->driver($this->{db}); + unless (defined $this->{db}) { + $this->error("could not find db"); + } + } +} + +sub DESTROY {} + +sub AUTOLOAD { + my $this=shift; + (my $command = our $AUTOLOAD) =~ s/.*://; + + debug "db $this->{name}" => "running $command(".join(",", map { "'$_'" } @_).") .."; + if (wantarray) { + my @ret=$this->{db}->$command(@_); + debug "db $this->{name}" => "$command returned (".join(", ", @ret).")"; + return @ret if @ret; + } + else { + my $ret=$this->{db}->$command(@_); + if (defined $ret) { + debug "db $this->{name}" => "$command returned \'$ret\'"; + return $ret; + } + else { + debug "db $this->{name}" => "$command returned undef"; + } + } + return; # failure +} + + +1 |
