~ubuntu-branches/ubuntu/vivid/libspoon-perl/vivid

« back to all changes in this revision

Viewing changes to inc/Module/Install/Base.pm

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Krzyżaniak (eloy), Krzysztof Krzyżaniak (eloy), gregor herrmann
  • Date: 2008-07-01 10:38:36 UTC
  • mfrom: (1.1.2 upstream) (3.1.1 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080701103836-04om5jc04qt53mt0
Tags: 0.24-1
[ Krzysztof Krzyżaniak (eloy) ]
* New upstream release
* debian/watch: remove uupdate part
* debian/control:
 + Standards-Version updated to 3.8.0 (without any changes)
 + Uploaders: added me
 + BuildDepends: increase dependency for debhelper to (>= 7)
* debian/rules: used debhelper 7 simple example
* debian/compat: increase to 7 (without any changes)

[ gregor herrmann <gregoa@debian.org> ]
* Take over for the Debian Perl Group with maintainer's permission
  (http://lists.debian.org/debian-perl/2008/06/msg00039.html)
* debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
  field (source stanza); Homepage field (source stanza). Changed:
  Maintainer set to Debian Perl Group <pkg-perl-
  maintainers@lists.alioth.debian.org> (was: Florian Ragwitz
  <rafl@debian.org>); Florian Ragwitz <rafl@debian.org> moved to
  Uploaders.
* debian/watch: use dist-based URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#line 1 "inc/Module/Install/Base.pm - /Users/ingy/local/lib/perl5/site_perl/5.8.6/Module/Install/Base.pm"
 
1
#line 1
2
2
package Module::Install::Base;
3
3
 
4
 
#line 28
 
4
$VERSION = '0.64';
 
5
 
 
6
# Suspend handler for "redefined" warnings
 
7
BEGIN {
 
8
        my $w = $SIG{__WARN__};
 
9
        $SIG{__WARN__} = sub { $w };
 
10
}
 
11
 
 
12
### This is the ONLY module that shouldn't have strict on
 
13
# use strict;
 
14
 
 
15
#line 41
5
16
 
6
17
sub new {
7
18
    my ($class, %args) = @_;
8
19
 
9
 
    foreach my $method (qw(call load)) {
 
20
    foreach my $method ( qw(call load) ) {
10
21
        *{"$class\::$method"} = sub {
11
 
            +shift->_top->$method(@_);
 
22
            shift()->_top->$method(@_);
12
23
        } unless defined &{"$class\::$method"};
13
24
    }
14
25
 
15
 
    bless(\%args, $class);
 
26
    bless( \%args, $class );
16
27
}
17
28
 
18
 
#line 46
 
29
#line 61
19
30
 
20
31
sub AUTOLOAD {
21
32
    my $self = shift;
22
 
    goto &{$self->_top->autoload};
 
33
    local $@;
 
34
    my $autoload = eval { $self->_top->autoload } or return;
 
35
    goto &$autoload;
23
36
}
24
37
 
25
 
#line 57
 
38
#line 76
26
39
 
27
40
sub _top { $_[0]->{_top} }
28
41
 
29
 
#line 68
 
42
#line 89
30
43
 
31
44
sub admin {
32
 
    my $self = shift;
33
 
    $self->_top->{admin} or Module::Install::Base::FakeAdmin->new;
 
45
    $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
34
46
}
35
47
 
36
48
sub is_admin {
37
 
    my $self = shift;
38
 
    $self->admin->VERSION;
 
49
    $_[0]->admin->VERSION;
39
50
}
40
51
 
41
52
sub DESTROY {}
44
55
 
45
56
my $Fake;
46
57
sub new { $Fake ||= bless(\@_, $_[0]) }
 
58
 
47
59
sub AUTOLOAD {}
 
60
 
48
61
sub DESTROY {}
49
62
 
 
63
# Restore warning handler
 
64
BEGIN {
 
65
        $SIG{__WARN__} = $SIG{__WARN__}->();
 
66
}
 
67
 
50
68
1;
51
69
 
52
 
__END__
53
 
 
54
 
#line 112
 
70
#line 138