### ### Copyright 2000-2007 University of Illinois Board of Trustees ### All rights reserved. ### ### PSGConf::Action::GenerateFile::Literal - action to generate literal files ### ### Campus Information Technologies and Educational Services ### University of Illinois at Urbana-Champaign ### package PSGConf::Action::GenerateFile::Literal; use strict; use PSGConf::Action::GenerateFile; our @ISA = qw(PSGConf::Action::GenerateFile); ############################################################################### ### generate method ############################################################################### sub generate { my ($self, $fh, $psgconf) = @_; print $fh $self->{content}; return 1; } ############################################################################### ### documentation ############################################################################### 1; __END__ =head1 NAME PSGConf::Action::GenerateFile::Literal - literal file-generation action =head1 SYNOPSIS use PSGConf::Action::GenerateFile::Literal; $psgconf->register_actions( PSGConf::Action::GenerateFile::Literal->new( 'name' => '/path/to/file', 'content' => '...', ... ), ... ); =head1 DESCRIPTION The B module provides a B action class for generating a file with specified content. The B class is derived from the B class, but it defines/overrides the following methods: =over 4 =item generate() Writes the value of the I attribute to the output file. =back In addition to the attributes supported by the B class, the B class supports the following attributes: =over 4 =item I The content to be written to the file. =back =head1 SEE ALSO L L L =cut