Text::SuDocs - Parse and normalize SuDocs numbers


The United States Government Printing Office uses a "Superintendent of Documents (SuDocs)" classification system to uniquely identify, categorize, and sort documents it tracks. This package is used for parsing and normalizing these identifiers.


my $sudocs = Text::SuDocs->new($string)

Creates a new Text::SuDocs object. Its sole argument is a scalar containing a SuDocs string.

my $string = $sudocs->agency()

my $string = $sudocs->subagency()

my $string = $sudocs->committee()

my $string = $sudocs->series()

my $string = $sudocs->relatedseries()

my $string = $sudocs->document()

These accessor methods are available to retrieve individual components of the SuDocs identifier.

my $string = $sudocs->original()

Accessor method for retrieving the original identifier.

my $string = $sudocs->normal_string()

This method returns the normalized expression of the SuDocs string. Normalization trims off whitespace, uppercases all alphas, and removes unneeded whitespace.

my $string = $sudocs->sortable_string(6)

This method returns the sortable expression of the SuDocs string. A sortable string is a normalized one with all the whitespace converted to underscores and all the numbers padded out with zeros. The default pad is eight digits, but this can be altered by passing in a single scalar for the pad length.


Please submit bug reports to Pull requests with fixes and enhancements are also welcome.



This code may be distributed under the same terms as Perl itself.

Please note that these modules are not products of or supported by the employers of the various contributors to the code.


Copyright 2011 LibLime, a Division of PTFS, Inc.


  • Clay Fouts (

1 POD Error

The following errors were encountered while parsing the POD:

Around line 202:

=over without closing =back