The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Lingua::EN::Titlecase::Simple - Automatically title-case headlines and title-texts.

VERSION

version 0.1

SYNOPSIS

        use Lingua::EN::Titlecase::Simple qw/titlecase/;

        print titlecase('Small word at end is nothing to be afraid of');
                # prints 'Small Word at End Is Nothing to Be Afraid Of'
        
        print titlecase('IF IT’S ALL CAPS, FIX IT');
                # prints 'If It’s All Caps, Fix It'

        # you can also batch-convert
        my @converted = titlecase("FIX THIS", "Fix that now", "don't forget This");

DESCRIPTION

This module provides a simple method for automatically titlecasing texts (generally headings and title texts) according to traditional editorial rules (it uses guidelines from "The New York Times Manual of Style").

While Lingua::EN::Titlecase already provides this functionality, this implementation is much lighter weight and provides a much simpler API. You are encouraged to check Lingua::EN::Titlecase out and see which one is better for your needs.

It should be noted that this module expects your input to be UTF-8, and you can rest assured your special UTF-8 characters will remain intact.

This module is a CPANization of Aristotle Pagaltzis's fork of John Gruber's Title Case script (see AUTHORS for links to original source code).

FUNCTIONS

titlecase( $text | @texts )

Returns a properly title-cased version of the provided text(s).

AUTHORS

Aristotle Pagaltzis (http://plasmasturm.org/code/titlecase/), based on work by John Gruber (http://daringfireball.net/2008/05/title_case).

Made into a CPAN distribution by Ido Perlmuter, <ido at ido50.net>

BUGS

Please report any bugs or feature requests to bug-lingua-en-titlecase-simple at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-EN-Titlecase-Simple. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

        perldoc Lingua::EN::Titlecase::Simple

You can also look for information at:

LICENSE AND COPYRIGHT

        Copyright 2008-2010 John Gruber, Aristotle Pagaltzis, Ido Perlmuter.

        Permission is hereby granted, free of charge, to any person obtaining
        a copy of this software and associated documentation files (the
        "Software"), to deal in the Software without restriction, including
        without limitation the rights to use, copy, modify, merge, publish,
        distribute, sublicense, and/or sell copies of the Software, and to
        permit persons to whom the Software is furnished to do so, subject to
        the following conditions:

        The above copyright notice and this permission notice shall be
        included in all copies or substantial portions of the Software.

        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
        CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
        TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
        SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 32:

Non-ASCII character seen before =encoding in 'IT’S'. Assuming UTF-8