Char-Greek
view release on metacpan or search on metacpan
lib/Egreek.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
Egreek - Run-time routines for Greek.pm
=head1 SYNOPSIS
use Egreek;
Egreek::split(...);
Egreek::tr(...);
Egreek::chop(...);
Egreek::index(...);
Egreek::rindex(...);
Egreek::lc(...);
Egreek::lc_;
Egreek::lcfirst(...);
Egreek::lcfirst_;
Egreek::uc(...);
Egreek::uc_;
Egreek::ucfirst(...);
Egreek::ucfirst_;
Egreek::fc(...);
Egreek::fc_;
Egreek::ignorecase(...);
Egreek::capture(...);
Egreek::chr(...);
Egreek::chr_;
Egreek::glob(...);
Egreek::glob_;
# "no Egreek;" not supported
=head1 ABSTRACT
This module has run-time routines for use Greek 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 Greek 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 Egreek 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 = Egreek::split(/pattern/,$string,$limit);
@split = Egreek::split(/pattern/,$string);
@split = Egreek::split(/pattern/);
@split = Egreek::split('',$string,$limit);
@split = Egreek::split('',$string);
@split = Egreek::split('');
@split = Egreek::split();
@split = Egreek::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, Egreek::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.575 second using v1.01-cache-2.11-cpan-0b5f733616e )