AIX-LPP

 view release on metacpan or  search on metacpan

LPP/lpp_name.pm  view on Meta::CPAN


}

sub read {
    my $class = shift;
    my $fh = shift;
    my $self = {};
    bless $self, $class;
    
    chomp (my $line = <$fh>);
    my ($format,$platform,$type,$name,$token) = split / /, $line;
    $self->lpp(NAME => $name, FORMAT => $format, TYPE => $type,
		PLATFORM => $platform);
    chomp ($line = <$fh>);

# add while loop here to process fileset headers

    my ($fsn,$vrmf,$disk,$bosboot,$content,$lang,@desc) = split / /, $line;
    $self->fileset($fsn, NAME => $fsn,VRMF => $vrmf,DISK => $disk,
	BOSBOOT => $bosboot, CONTENT => $content, LANG => $lang,
	DESCRIPTION => join ' ', @desc);

scripts/mkcontrol  view on Meta::CPAN

# usage: mkcontrol < lpp_name > control

use AIX::LPP::lpp_name;

# change this to use stdin/stdout

$package = AIX::LPP::lpp_name->read(\*STDIN);

# instead of calling write(), find the data we want and print it to stdout

my ($name,$version,$type,$four,$fs) = $package->lpp();

my ($fsname,$vrmf,$disk,$bboot,$cntnt,$lang,$desc,$cmnt) = 
	$package->fileset($fs);
print 'NAME=',"$fsname\n";
print 'VERSION=',"$vrmf\n";
print 'DESCRIPTION=',"$desc\n";



( run in 1.998 second using v1.01-cache-2.11-cpan-df04353d9ac )