Char-UTF2
view release on metacpan or search on metacpan
lib/Eutf2.pm view on Meta::CPAN
#
# instead of Carp::confess
#
sub confess {
my $i = 0;
my @confess = ();
while (my($package,$filename,$line,$subroutine) = caller($i)) {
push @confess, "[$i] $filename($line) $package::$subroutine\n";
$i++;
}
print STDERR CORE::reverse @confess;
print STDERR "\n";
print STDERR @_;
die "\n";
}
1;
__END__
=pod
=head1 NAME
Eutf2 - Run-time routines for UTF2.pm
=head1 SYNOPSIS
use Eutf2;
Eutf2::split(...);
Eutf2::tr(...);
Eutf2::chop(...);
Eutf2::index(...);
Eutf2::rindex(...);
Eutf2::lc(...);
Eutf2::lc_;
Eutf2::lcfirst(...);
Eutf2::lcfirst_;
Eutf2::uc(...);
Eutf2::uc_;
Eutf2::ucfirst(...);
Eutf2::ucfirst_;
Eutf2::fc(...);
Eutf2::fc_;
Eutf2::ignorecase(...);
Eutf2::capture(...);
Eutf2::chr(...);
Eutf2::chr_;
Eutf2::glob(...);
Eutf2::glob_;
# "no Eutf2;" not supported
=head1 ABSTRACT
This module has run-time routines for use UTF2 software automatically, you
do not have to use.
=head1 BUGS AND LIMITATIONS
I have tested and verified this software using the best of my ability.
However, a software containing much regular expression is bound to contain
some bugs. Thus, if you happen to find a bug that's in UTF2 software and not
your own program, you can try to reduce it to a minimal test case and then
report it to the following author's address. If you have an idea that could
make this a more useful tool, please let everyone share it.
=head1 HISTORY
This Eutf2 module first appeared in ActivePerl Build 522 Built under
MSWin32 Compiled at Nov 2 1999 09:52:28
=head1 AUTHOR
INABA Hitoshi E<lt>ina@cpan.orgE<gt>
This project was originated by INABA Hitoshi.
For any questions, use E<lt>ina@cpan.orgE<gt> so we can share
this file.
=head1 LICENSE AND COPYRIGHT
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
=head1 EXAMPLES
=over 2
=item * Split string
@split = Eutf2::split(/pattern/,$string,$limit);
@split = Eutf2::split(/pattern/,$string);
@split = Eutf2::split(/pattern/);
@split = Eutf2::split('',$string,$limit);
@split = Eutf2::split('',$string);
@split = Eutf2::split('');
@split = Eutf2::split();
@split = Eutf2::split;
This subroutine scans a string given by $string for separators, and splits the
string into a list of substring, returning the resulting list value in list
context or the count of substring in scalar context. Scalar context also causes
split to write its result to @_, but this usage is deprecated. The separators
are determined by repeated pattern matching, using the regular expression given
in /pattern/, so the separators may be of any size and need not be the same
string on every match. (The separators are not ordinarily returned; exceptions
are discussed later in this section.) If the /pattern/ doesn't match the string
at all, Eutf2::split returns the original string as a single substring, If it
matches once, you get two substrings, and so on. You may supply regular
expression modifiers to the /pattern/, like /pattern/i, /pattern/x, etc. The
//m modifier is assumed when you split on the pattern /^/.
If $limit is specified and positive, the subroutine splits into no more than that
many fields (though it may split into fewer if it runs out of separators). If
( run in 0.741 second using v1.01-cache-2.11-cpan-39bf76dae61 )