## ---------------------------------------------------------------------------- # String::CamelCase # ----------------------------------------------------------------------------- # Mastering programmed by YAMASHINA Hio # # Copyright 2006 YAMASHINA Hio # ----------------------------------------------------------------------------- # $Id$ # ----------------------------------------------------------------------------- package String::CamelCase; use warnings; use strict; our $VERSION = '0.01'; use base qw(Exporter); our @EXPORT_OK = qw(camelize decamelize wordsplit); 1; sub wordsplit { my $s = shift; split( /[_\s]+|\b|(? SomeKeyword print decamelize("SomeKeyword"); # ==> some_keyword print wordsplit("some_keyword"); # ==> (some, keyword) print wordsplit("SomeKeyword"); # ==> (Some, Keyword) =head1 EXPORT This module can export two functions, C and C. =head1 FUNCTIONS =head2 camelize($under_score) convert from under_score text to CamelCase one. =head2 decamelize($CamelCase) convert from CamelCase text to under_score one. =head2 wordsplit($str) =head1 AUTHOR YAMASHINA Hio, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc String::CamelCase You can also look for information at: =over 4 =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * RT: CPAN's request tracker L =item * Search CPAN L =back =head1 SEE ALSO L L =head1 COPYRIGHT & LICENSE Copyright 2006 YAMASHINA Hio, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut # ----------------------------------------------------------------------------- # End of File. # -----------------------------------------------------------------------------