package VineLinux::VSS::Type::PerlModule;

use base qw( VineLinux::VSS::Type );

use VineLinux::VSS::Skeleton::PerlModule::Spec;
use VineLinux::VSS::Skeleton::PerlModule::FilterRequiresSh;

sub generate {
    my $class = shift;
    my $vss = shift;

    my $filename = '';
    my @skeleton_data;
    my $tmpl;

    my $params = $class->_set_params($vss);
   
    # <package>-vl.spec
    @skeleton_data = <VineLinux::VSS::Skeleton::PerlModule::Spec::DATA>;
    $tmpl = HTML::Template->new(arrayref => \@skeleton_data,
				die_on_bad_params => 0);
    $tmpl->param($params);
    $filename = $vss->package_name . '-vl.spec';
    $class->_generate_file($filename, $tmpl->output);

    # filter-requires-<package>.sh
    @skeleton_data = <VineLinux::VSS::Skeleton::PerlModule::FilterRequiresSh::DATA>;
    $tmpl = HTML::Template->new(arrayref => \@skeleton_data,
				die_on_bad_params => 0);
    $tmpl->param($params);
    $filename = "filter-requires-" . $vss->package_name . '.sh';
    $class->_generate_file($filename, $tmpl->output);
}


1;


