###
###  Copyright 2000-2007 University of Illinois Board of Trustees
###  All rights reserved. 
###
###  PSGConf::Import::shells - psgconf-import module to parse input
###
###  Campus Information Technologies and Educational Services
###  University of Illinois at Urbana-Champaign
###

package PSGConf::Import::shells;

use strict;

BEGIN {
	use Exporter ();
	our (@ISA, @EXPORT);
	@ISA = qw(Exporter);
	@EXPORT = qw(&init &parse);
}

sub init {
	my ($psgconf) = @_;
	my ($self);

	return $self;
}

sub parse {
	my ($self, $line) = @_;

	### Remove all comments...
	$line =~ s/#.*$//;

	return ( m/^[\s\t]*$/o || m/^$/o )? undef: $line;
}


###############################################################################
###  documentation
###############################################################################

1;

__END__

=head1 NAME

PSGConf::Import::shells - psgconf-import module to parse input

=head1 SYNOPSIS

  use PSGConf::Import::shells;

=head1 DESCRIPTION

The B<PSGConf::Import::inittab> module provides a class which
defines how psgconf-import will parse the </etc/shells> file
to write out Config::Objective formatted directives to use
in psgconf config files.

=over 4

=item init()

Currently unimplemented.

=item parse()

Reads the F</etc/shells> file and returns a C<PSGConf::Data::String>
object for each line.

=back

=head1 SEE ALSO

L<perl>

L<Config::Objective>

=cut



syntax highlighted by Code2HTML, v. 0.9.1