Config-Inetd

 view release on metacpan or  search on metacpan

lib/Config/Inetd.pm  view on Meta::CPAN

Returns true if the service is enlisted as enabled, false if enlisted
as disabled and undef if the service does not exist.

=head2 enable

Enables a service.

 $inetd->enable($service => $protocol);

Returns true if the service has been enabled, false if no action has
been taken.

It is recommended to precedingly call C<is_enabled()> with according
arguments supplied to determine whether a service is disabled.

=head2 disable

Disables a service.

 $inetd->disable($service => $protocol);

Returns true if the service has been disabled, false if no action has
been taken.

It is recommended to precedingly call C<is_enabled()> with according
arguments supplied to determine whether a service is enabled.

=head2 dump_enabled

Dumps the enabled services.

 @dump = $inetd->dump_enabled;

Returns a flat list that consists of the enabled entries as seen in the
configuration file.

=head2 dump_disabled

Dumps the disabled services.

 @dump = $inetd->dump_disabled;

Returns a flat list that consists of the disabled entries as seen in the
configuration file.

=head2 config

Access the tied configuration file.

 @config = @{$inetd->config};

Returns an array reference.

=head1 INSTANCE DATA

The inetd configuration file is tied as instance data with newlines
preserved; it may be accessed via C<< $inetd->config >>.

=head1 BUGS & CAVEATS

It is strongly advised that the configuration file is B<backuped> first
if one is intending to work with the default (i.e., system-wide)
configuration file and not a customized one.

Accessing C<< @{$inetd->{CONF}} >> is deprecated and superseded by
C<< $inetd->config >>.

=head1 SEE ALSO

L<Tie::File>, inetd.conf(5)

=head1 AUTHOR

Steven Schubiger <schubiger@cpan.org>

=head1 LICENSE

This program is free software; you may redistribute it and/or
modify it under the same terms as Perl itself.

See L<http://dev.perl.org/licenses/>

=cut



( run in 1.071 second using v1.01-cache-2.11-cpan-2398b32b56e )