/[gentoo-perl]/g-cpan/trunk/lib/Gentoo.pm
Gentoo

Contents of /g-cpan/trunk/lib/Gentoo.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (show annotations) (download) (as text)
Wed May 10 16:15:56 2006 UTC (7 years, 11 months ago) by mcummings
File MIME type: text/x-perl
File size: 2549 byte(s)
Moved Ebuild.pm to Portage.pm
1 package Gentoo;
2
3 use 5.008007;
4 use strict;
5 use warnings;
6 use Data::Dumper;
7
8 #### Load the other namespaces.
9 #### Gentoo.pm is the primary if these aren't accessed directly.
10
11 use Gentoo::Config;
12 use Gentoo::Portage;
13 use Gentoo::CPAN;
14
15 # These libraries were influenced and largely written by
16 # Christian Hartmann <ian@gentoo.org> originally. All of the good
17 # parts are ian's - the rest is mcummings messing around.
18
19 require Exporter;
20
21 our @ISA = qw(Exporter UNIVERSAL );
22
23 #our @EXPORT = qw( getAvailableEbuilds
24 #getCPANPackages
25 #);
26
27 our $VERSION = '0.01';
28 sub _init
29 {
30 my ($self, %args) = @_;
31 return if $self->{_init}{__PACKAGE__}++;
32 $self->Gentoo::Portage::_init(%args);
33 $self->Gentoo::Config::_init(%args);
34 }
35
36 sub UNIVERSAL::debug
37 {
38 my ($package, $file, $line) = caller();
39 my $subroutine = (caller(1))[3] || $package;
40 print STDERR "In $subroutine ($file:$line):\n", Data::Dumper->Dump([$_[0]]);
41 }
42
43 sub new
44 {
45 my $proto = shift;
46 my %args = @_;
47 my $class = ref($proto) || $proto;
48 my $self = {};
49
50 $self->{modules} = {};
51 if ($args{portage_categories}) { $self->{portage_categories} = @{$args{portage_categories}}; }
52 $self->{DEBUG} = $args{debug};
53 $self->{packagelist} = [];
54
55 bless($self, $class);
56 return $self;
57 }
58
59 sub DESTROY
60 {
61 my ($self) = @_;
62 return if $self->{DESTROY}{__PACKAGE__}++;
63
64 $self->Gentoo::Config::DESTROY();
65 $self->Gentoo::Portage::DESTROY();
66 }
67
68 1;
69 __END__
70 # Below is stub documentation for your module. You'd better edit it!
71
72 =head1 NAME
73
74 Gentoo - Perl extension for blah blah blah
75
76 =head1 SYNOPSIS
77
78 use Gentoo;
79 blah blah blah
80
81 =head1 DESCRIPTION
82
83 Stub documentation for Gentoo, created by h2xs. It looks like the
84 author of the extension was negligent enough to leave the stub
85 unedited.
86
87 Blah blah blah.
88
89 =head2 EXPORT
90
91 None by default.
92
93
94
95 =head1 SEE ALSO
96
97 Mention other useful documentation such as the documentation of
98 related modules or operating system documentation (such as man pages
99 in UNIX), or any relevant external documentation such as RFCs or
100 standards.
101
102 If you have a mailing list set up for your module, mention it here.
103
104 If you have a web site set up for your module, mention it here.
105
106 =head1 AUTHOR
107
108 A. U. Thor, E<lt>mcummings@datanode.netE<gt>
109
110 =head1 COPYRIGHT AND LICENSE
111
112 Copyright (C) 2006 by A. U. Thor
113
114 This library is free software; you can redistribute it and/or modify
115 it under the same terms as Perl itself, either Perl version 5.8.8 or,
116 at your option, any later version of Perl 5 you may have available.
117
118
119 =cut

  ViewVC Help
Powered by ViewVC 1.1.20