# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# bos720 src/perl/libext/CatGetS/CatGetS.pm 1.1.1.1 
#  
# Licensed Materials - Property of IBM 
#  
# Restricted Materials of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2004 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
package LibExt::CatGetS;

use strict;
use warnings;

require Exporter;

our @ISA = qw(Exporter);

our @EXPORT = qw(catgets);

our $VERSION = '1.0';

require XSLoader;
XSLoader::load('LibExt::CatGetS', $VERSION);

1;
__END__

=head1 NAME

LibExt::CatGetS - Perl extension for catgets() C function

=head1 SYNOPSIS

  use LibExt::CatGetS;
  printf(catgets('cmdinstl_e.cat', 3, 11,
                 '%1$s:  Cannot access or open file %2$s.\n\tCheck path name and permissions'), 
         @msgargs);

=head1 DESCRIPTION

Provides a Perl interface to the catgets() C function, which behaves a lot like
the first part of the dspmsg command.

=head1 EXPORT

=over 4

=item catgets(CatalogName, SetNumber, MessageNumber, DefaultMessage)

Returns the message format string (a la printf) identified by the specified set and message
number from the specified catalog.  Any problem (catalog not found, bad set/message
number, etc.) results in the C<DefaultMessage> string being returned.

Argument names are indentical to those found in C<man dspmsg>:

=over 4

=item CatalogName

The filename OR the full path of the catalog to open.

=item SetNumber

The set number within the catalog.

=item MessageNumber

The message number.

=item DefaultMessage

The format string to use if catalog lookup fails for any reason.

=back

=back

=head1 SEE ALSO

=over 4

=item The C<catgets> subroutine.

=item The C<dspmsg> command

=cut