source: projects/vine-spec-skeleton/tags/release-0.1/lib/VineLinux/VSS.pm @ 488

Revision 488, 803 bytes checked in by iwaim, 14 years ago (diff)

vine-spec-skeleton: 0.1

Line 
1package VineLinux::VSS;
2
3use strict;
4use warnings;
5
6use VineLinux::VSS::Type::Elisp;
7use VineLinux::VSS::Type::SelfBuild;
8
9use base qw( Class::Accessor::Fast );
10__PACKAGE__->mk_accessors( qw(type) );
11
12our $VERSION = '0.1';
13
14sub 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
26sub 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
42sub bootstrap{
43    my $class = shift;
44    my $self = $class->new(@_);
45    $self->run();
46    return $self;
47}
48
491;
50
Note: See TracBrowser for help on using the repository browser.