Philip Newton > Lingua-Klingon-Segment-1.03 > Lingua::Klingon::Segment

Download:
Lingua-Klingon-Segment-1.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.03   Source  

NAME ^

Lingua::Klingon::Segment - Segment Klingon words into syllables and letters

VERSION ^

This document refers to version 1.03 of Lingua::Klingon::Segment, released on 2004-05-17.

SYNOPSIS ^

  use Lingua::Klingon::Segment;

  my @syllables = Lingua::Klingon::Segment::syllabify('monghom');
  # @syllables = qw(mon ghom)

  my @letters = Lingua::Klingon::Segment::spell('monghom');
  # @letters = qw(m o n gh o m)

or

  use Lingua::Klingon::Segment ':all';

  my @syllables = syllabify('mongHom');
  # @syllables = qw(mong Hom)

  my @letters = spell('mongHom');
  # @letters = qw(m o ng H o m)

or

  use Lingua::Klingon::Segment qw( syllabify );

  my @syllables = syllabify('vavoy');
  # @syllables = qw(va voy)

DESCRIPTION ^

Overview

Lingua::Klingon::Segment is a module which allows you to decompose Klingon words into syllables and letters.

Exports

Lingua::Klingon::Segment exports no functions by default, in order to avoid namespace pollution. However, all functions listed here can be imported explicitly by naming them, or they can be imported all together by using the tag ':all'.

syllabify

This subroutine splits a given word or phrase into syllables. It returns the list of syllables that make up that word or phrase.

If the input is a multi-word phrase, the output is the list of all syllables in that phrase, regardless of which word they came from (for example, the output of "syllabify 'jISop vIneH'" is qw(jI Sop vI neH).

In scalar context, returns the number of syllables in the input.

spell

This subroutine splits a given word or phrase into letters. It returns the list of letters that make up that word or phrase (counting all Klingon letters as one, including 'ch', 'gh', 'ng', and 'tlh').

If the input is a multi-word phrase, the output is the list of all Klingon letters in that phrase. Non-letters such as spaces or punctuation are not included.

If the input includes words which are not Klingon words, the output is undefined.

In scalar context, returns the number of Klingon letters in the input.

BUGS ^

None currently known. If you find any, please email me.

SEE ALSO ^

strcoll(3), strxfrm(3)

FEEDBACK ^

If you use this module, I'd appreciate it if you drop me a line at the email address in "AUTHOR", just so that I have an idea of how many people use this module at all. Also, if you have any comments, feel free to email me.

AUTHOR ^

Philip Newton, <pne@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2003, 2004 by Philip Newton. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

syntax highlighting: