https://github.com/nigelhorne/text-names-abbreviate
Create abbreviated name formats from full names
https://github.com/nigelhorne/text-names-abbreviate
cpan cpan-module perl perl5
Last synced: 9 months ago
JSON representation
Create abbreviated name formats from full names
- Host: GitHub
- URL: https://github.com/nigelhorne/text-names-abbreviate
- Owner: nigelhorne
- License: gpl-2.0
- Created: 2025-05-29T00:50:21.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-12T04:30:23.000Z (10 months ago)
- Last Synced: 2025-09-28T09:59:50.070Z (9 months ago)
- Topics: cpan, cpan-module, perl, perl5
- Language: Perl
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[](https://metacpan.org/pod/Text::Names::Abbreviate)

# NAME
Text::Names::Abbreviate - Create abbreviated name formats from full names
# SYNOPSIS
use Text::Names::Abbreviate qw(abbreviate);
say abbreviate("John Quincy Adams"); # "J. Q. Adams"
say abbreviate("Adams, John Quincy"); # "J. Q. Adams"
say abbreviate("George R R Martin", { format => 'initials' }); # "G.R.R.M."
# DESCRIPTION
This module provides simple abbreviation logic for full personal names,
with multiple formatting options and styles.
# SUBROUTINES/METHODS
## abbreviate
Make the abbreviation.
It takes the following optional arguments:
- format
One of: default, initials, compact, shortlast
- style
One of: first\_last, last\_first
- separator
Customize the spacing/punctuation for initials (default: ". ")
### API SPECIFICATION
#### INPUT
{
'name' => { 'type' => 'string', 'min' => 1 },
'format' => {
'type' => 'string',
'memberof' => [ 'default', 'initials', 'compact', 'shortlast' ],
'optional' => 1
}, 'style' => {
'type' => 'string',
'memberof' => [ 'first_last', 'last_first' ],
'optional' => 1
}, 'separator' => {
'type' => 'string',
'optional' => 1
}
}
#### OUTPUT
Argument error: croak
{
'type' => 'string',
}
# AUTHOR
Nigel Horne, ``
# BUGS
# REPOSITORY
[https://github.com/nigelhorne/Text-Names-Abbreviate](https://github.com/nigelhorne/Text-Names-Abbreviate)
# SEE ALSO
- Test coverage report: [https://nigelhorne.github.io/Text-Names-Abbreviate/coverage/](https://nigelhorne.github.io/Text-Names-Abbreviate/coverage/)
# SUPPORT
This module is provided as-is without any warranty.
Please report any bugs or feature requests to `bug-text-names-abbreviate at rt.cpan.org`,
or through the web interface at
[http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Names-Abbreviate](http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Names-Abbreviate).
I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Text::Names::Abbreviate
You can also look for information at:
- MetaCPAN
[https://metacpan.org/dist/Text-Names-Abbreviate](https://metacpan.org/dist/Text-Names-Abbreviate)
- RT: CPAN's request tracker
[https://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Names-Abbreviate](https://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-Names-Abbreviate)
- CPAN Testers' Matrix
[http://matrix.cpantesters.org/?dist=Text-Names-Abbreviate](http://matrix.cpantesters.org/?dist=Text-Names-Abbreviate)
- CPAN Testers Dependencies
[http://deps.cpantesters.org/?module=Text::Names::Abbreviate](http://deps.cpantesters.org/?module=Text::Names::Abbreviate)
# LICENCE AND COPYRIGHT
Copyright 2025 Nigel Horne.
Usage is subject to licence terms.
The licence terms of this software are as follows:
- Personal single user, single computer use: GPL2
- All other users (including Commercial, Charity, Educational, Government)
must apply in writing for a licence for use from Nigel Horne at the
above e-mail.