package VineLinux::VSS;

use strict;
use warnings;

use VineLinux::VSS::Type::Elisp;
use VineLinux::VSS::Type::SelfBuild;

use base qw( Class::Accessor::Fast );
__PACKAGE__->mk_accessors( qw(type) );

our $VERSION = '0.1';

sub new{
    my ($class, %opt) = @_;

    my $self = bless {
	type => '',
    }, $class;

    $self->type($opt{type});

    return $self;
}

sub run{
    my $class = shift;

    my $type = $class->type;
    print "generating sleleton files: "  . $type  . "\n";
    
    if ($type eq 'elisp') {
	VineLinux::VSS::Type::Elisp->generate;
    } elsif ($type eq 'self-build') {
	VineLinux::VSS::Type::SelfBuild->generate;
    }

    print "done.\n";
    return $class;
}

sub bootstrap{
    my $class = shift;
    my $self = $class->new(@_);
    $self->run();
    return $self;
}

1;

