Revision 488,
803 bytes
checked in by iwaim, 15 years ago
(diff) |
vine-spec-skeleton: 0.1
|
Line | |
---|
1 | package VineLinux::VSS; |
---|
2 | |
---|
3 | use strict; |
---|
4 | use warnings; |
---|
5 | |
---|
6 | use VineLinux::VSS::Type::Elisp; |
---|
7 | use VineLinux::VSS::Type::SelfBuild; |
---|
8 | |
---|
9 | use base qw( Class::Accessor::Fast ); |
---|
10 | __PACKAGE__->mk_accessors( qw(type) ); |
---|
11 | |
---|
12 | our $VERSION = '0.1'; |
---|
13 | |
---|
14 | sub new{ |
---|
15 | my ($class, %opt) = @_; |
---|
16 | |
---|
17 | my $self = bless { |
---|
18 | type => '', |
---|
19 | }, $class; |
---|
20 | |
---|
21 | $self->type($opt{type}); |
---|
22 | |
---|
23 | return $self; |
---|
24 | } |
---|
25 | |
---|
26 | sub run{ |
---|
27 | my $class = shift; |
---|
28 | |
---|
29 | my $type = $class->type; |
---|
30 | print "generating sleleton files: " . $type . "\n"; |
---|
31 | |
---|
32 | if ($type eq 'elisp') { |
---|
33 | VineLinux::VSS::Type::Elisp->generate; |
---|
34 | } elsif ($type eq 'self-build') { |
---|
35 | VineLinux::VSS::Type::SelfBuild->generate; |
---|
36 | } |
---|
37 | |
---|
38 | print "done.\n"; |
---|
39 | return $class; |
---|
40 | } |
---|
41 | |
---|
42 | sub bootstrap{ |
---|
43 | my $class = shift; |
---|
44 | my $self = $class->new(@_); |
---|
45 | $self->run(); |
---|
46 | return $self; |
---|
47 | } |
---|
48 | |
---|
49 | 1; |
---|
50 | |
---|
Note: See
TracBrowser
for help on using the repository browser.