###
###  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<PSGConf::Action::GenerateFile::Literal> module provides a B<PSGConf>
action class for generating a file with specified content.

The B<PSGConf::Action::GenerateFile::Literal> class is derived from the
B<PSGConf::Action::GenerateFile> class, but it defines/overrides the
following methods:

=over 4

=item generate()

Writes the value of the I<content> attribute to the output file.

=back

In addition to the attributes supported by
the B<PSGConf::Action::GenerateFile> class, the
B<PSGConf::Action::GenerateFile::Literal> class supports the following
attributes:

=over 4

=item I<content>

The content to be written to the file.

=back

=head1 SEE ALSO

L<perl>

L<PSGConf>

L<PSGConf::Action::GenerateFile>

=cut



syntax highlighted by Code2HTML, v. 0.9.1