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/Template/Transient.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/Template/Transient.pm')
| -rw-r--r-- | beagle/debian-rfs/usr/share/perl5/Debconf/Template/Transient.pm | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/beagle/debian-rfs/usr/share/perl5/Debconf/Template/Transient.pm b/beagle/debian-rfs/usr/share/perl5/Debconf/Template/Transient.pm new file mode 100644 index 0000000..beb7865 --- /dev/null +++ b/beagle/debian-rfs/usr/share/perl5/Debconf/Template/Transient.pm @@ -0,0 +1,70 @@ +#!/usr/bin/perl -w +# This file was preprocessed, do not edit! + + +package Debconf::Template::Transient; +use strict; +use base 'Debconf::Template'; +use fields qw(_fields); + + + +sub new { + my $this=shift; + my $template=shift; + + unless (ref $this) { + $this = fields::new($this); + } + $this->{template}=$template; + $this->{_fields}={}; + return $this; +} + + +sub get { + die "get not supported on transient templates"; +} + + +sub fields { + my $this=shift; + + return keys %{$this->{_fields}}; +} + + +sub clearall { + my $this=shift; + + foreach my $field (keys %{$this->{_fields}}) { + delete $this->{_fields}->{$field}; + } +} + + +{ + my @langs=Debconf::Template::_getlangs(); + + sub AUTOLOAD { + (my $field = our $AUTOLOAD) =~ s/.*://; + no strict 'refs'; + *$AUTOLOAD = sub { + my $this=shift; + + return $this->{_fields}->{$field}=shift if @_; + + if ($Debconf::Template::i18n && @langs) { + foreach my $lang (@langs) { + return $this->{_fields}->{$field.'-'.lc($lang)} + if exists $this->{_fields}->{$field.'-'.lc($lang)}; + } + } + return $this->{_fields}->{$field}; + }; + goto &$AUTOLOAD; + } +} + + +1 |
