@@ -1,6 +1,17 @@
-Revision history for Perl module PerlIO::via::Unidecode
- Time-stamp: "2003-08-26 02:12:57 ADT"
+ (Last-Modified Time-stamp: "2014-07-27 02:40:31 MDT sburke@cpan.org")
+REVISION HISTORY FOR PERL MODULE PerlIO::via::Unidecode --
+
+
+2014-07-26 Sean M. Burke sburke@cpan.org
+ * Release 1.02 -- NO CHANGE TO THE CODE.
+ Just updating the documentation and dist
+ stuff (Makefile,PL, README, MANIFEST.SKIP, etc.)
+ Updated t/*.t to be more liberal in accepting whatever
+ Cyrillic-to-ASCII transliteration that Unidecode is
+ using these days.
+
+
2003-08-26 Sean M. Burke sburke@cpan.org
* Release 1.01 -- First public release.
@@ -0,0 +1,7 @@
+
+ [Last Modified Time-stamp: "2014-07-26 01:51:35 MDT sburke@cpan.org"]
+
+
+This module, PerlIO::via::Unidecode (along with its documentation)
+is distributed under the same terms as Perl itself.
+
@@ -1,10 +1,11 @@
ChangeLog
lib/PerlIO/via/Unidecode.pm
-Makefile.old
+LICENSE
Makefile.PL
MANIFEST
MANIFEST.SKIP
README
t/00via.t
t/10fet.t
-META.yml Module meta-data (added by MakeMaker)
+META.yml Module YAML meta-data (added by MakeMaker)
+META.json Module JSON meta-data (added by MakeMaker)
@@ -1,4 +1,14 @@
-.bak$
+#
+# Last Modified Time-stamp: "2014-07-26 01:47:11 MDT sburke@cpan.org"
+#
+\.bak$
+\.old$
Makefile$
~$
.tar.gz$
+~
+CACHEDIR.TAG
+_*00_ABOUT_THIS_DIR.txt
+MYMETA.*
+SMB_.*
+/[0-9]{1,3}$
@@ -0,0 +1,44 @@
+{
+ "abstract" : "a perlio layer for Unidecode",
+ "author" : [
+ "Sean Burke <sburke@cpan.org>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "PerlIO-via-Unidecode",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Text::Unidecode" : 0,
+ "perl" : "5.008",
+ "strict" : 0,
+ "utf8" : 0
+ }
+ }
+ },
+ "release_status" : "stable",
+ "version" : "1.02"
+}
@@ -1,13 +1,25 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: PerlIO-via-Unidecode
-version: 1.01
-version_from: lib/PerlIO/via/Unidecode.pm
-installdirs: site
+---
+abstract: 'a perlio layer for Unidecode'
+author:
+ - 'Sean Burke <sburke@cpan.org>'
+build_requires:
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: PerlIO-via-Unidecode
+no_index:
+ directory:
+ - t
+ - inc
requires:
- strict: 0
- Text::Unidecode: 0
- utf8: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.16
+ Text::Unidecode: 0
+ perl: 5.008
+ strict: 0
+ utf8: 0
+version: 1.02
@@ -1,28 +1,55 @@
-# require 5.008;
+# This -*-perl-*- script writes the Makefile for installing this distribution.
+# ( Last Modified Time-stamp: "2014-07-26 02:34:05 MDT sburke@cpan.org" )
+#======================================================================
+#
+# For info on instaling this module and how to control it, see:
+# perldoc cpan
+# perldoc cpanp
+# perldoc perlmodinstall
+# perldoc ExtUtils::MakeMaker
+#
+#
+#======================================================================
+
+require 5.008_000; # # <==========!!!!!!!!!!
+my $min_perl_version = 5.008_000; # # <==========!!!!!!!!!!
+
+# For the module author: see lib/ExtUtils/MakeMaker.pm for details
+# of how to influence the contents of the Makefile that is written.
+# Incidentally. Perldoc perlfunc says "use " is compile-time, but
+# "require 5.6" is runtime.
+
use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
+#if( $ExtUtils::MakeMaker::VERSION < 6.47 ) {
+# die "I need at least perl version $min_perl_version";
+#}
+
WriteMakefile(
- 'NAME' => 'PerlIO::via::Unidecode',
- 'VERSION_FROM' => 'lib/PerlIO/via/Unidecode.pm', # finds $VERSION
- 'ABSTRACT_FROM' => 'lib/PerlIO/via/Unidecode.pm',
- 'dist' => { COMPRESS => 'gzip -5f', SUFFIX => 'gz', },
- 'PREREQ_PM' => {
- 'strict' => 0,
- 'utf8' => 0,
- 'Text::Unidecode' => 0,
- 'Text::Unidecode' => 0,
- },
-
-);
+ 'NAME' => 'PerlIO::via::Unidecode',
+ 'VERSION_FROM' => 'lib/PerlIO/via/Unidecode.pm',
+ 'ABSTRACT_FROM' => 'lib/PerlIO/via/Unidecode.pm',
+ 'PREREQ_PM' => {
+ 'strict' => 0,
+ 'utf8' => 0,
+ 'Text::Unidecode' => 0,
+ },
-package MY;
+ 'AUTHOR' => 'Sean Burke <sburke@cpan.org>',
+ 'LICENSE' => 'perl',
+ # "...under the same terms as Perl itself"
-sub libscan
-{ # Determine things that should *not* be installed
- my($self, $path) = @_;
- return '' if $path =~ m/~/;
- $path;
-}
+
+ ($ExtUtils::MakeMaker::VERSION >= 6.47
+ ? ('MIN_PERL_VERSION' => $min_perl_version )
+
+ : () # Otherwise we can't express that metadata about this
+ # whole module suite, and we just have to let the version
+ # "require" thing up there block this whole Makefile.PL
+ # from running.
+ ),
+
+ 'dist' => { COMPRESS => 'gzip -4f', SUFFIX => 'gz', },
+
+);
__END__
@@ -1,733 +0,0 @@
-# This Makefile is for the PerlIO::via::Unidecode extension to perl.
-#
-# It was generated automatically by MakeMaker version
-# 6.16 (Revision: 1.131) from the contents of
-# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
-#
-# ANY CHANGES MADE HERE WILL BE LOST!
-#
-# MakeMaker ARGV: ()
-#
-# MakeMaker Parameters:
-
-# ABSTRACT_FROM => q[lib/PerlIO/via/Unidecode.pm]
-# NAME => q[PerlIO::via::Unidecode]
-# PREREQ_PM => { strict=>q[0], Text::Unidecode=>q[0], utf8=>q[0] }
-# VERSION_FROM => q[lib/PerlIO/via/Unidecode.pm]
-# dist => { COMPRESS=>q[gzip -5f], SUFFIX=>q[gz] }
-
-# --- MakeMaker post_initialize section:
-
-
-# --- MakeMaker const_config section:
-
-# These definitions are from config.sh (via /usr/local/lib/perl5/5.8.0/i686-linux/Config.pm)
-
-# They may have been overridden via Makefile.PL or on the command line
-AR = ar
-CC = gcc
-CCCDLFLAGS = -fpic
-CCDLFLAGS = -rdynamic
-DLEXT = so
-DLSRC = dl_dlopen.xs
-LD = gcc
-LDDLFLAGS = -shared -L/usr/local/lib
-LDFLAGS = -L/usr/local/lib
-LIBC = /lib/libc-2.3.1.so
-LIB_EXT = .a
-OBJ_EXT = .o
-OSNAME = linux
-OSVERS = 2.4.20
-RANLIB = :
-SITELIBEXP = /usr/local/lib/perl5/site_perl/5.8.0
-SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.8.0/i686-linux
-SO = so
-EXE_EXT =
-FULL_AR = /usr/bin/ar
-VENDORARCHEXP =
-VENDORLIBEXP =
-
-
-# --- MakeMaker constants section:
-AR_STATIC_ARGS = cr
-DIRFILESEP = /
-NAME = PerlIO::via::Unidecode
-NAME_SYM = PerlIO_via_Unidecode
-VERSION = 1.01
-VERSION_MACRO = VERSION
-VERSION_SYM = 1_01
-DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
-XS_VERSION = 1.01
-XS_VERSION_MACRO = XS_VERSION
-XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
-INST_ARCHLIB = blib/arch
-INST_SCRIPT = blib/script
-INST_BIN = blib/bin
-INST_LIB = blib/lib
-INST_MAN1DIR = blib/man1
-INST_MAN3DIR = blib/man3
-MAN1EXT = 1
-MAN3EXT = 3
-INSTALLDIRS = site
-DESTDIR =
-PREFIX =
-PERLPREFIX = /usr/local
-SITEPREFIX = /usr/local
-VENDORPREFIX =
-INSTALLPRIVLIB = $(PERLPREFIX)/lib/perl5/5.8.0
-DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
-INSTALLSITELIB = $(SITEPREFIX)/lib/perl5/site_perl/5.8.0
-DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
-INSTALLVENDORLIB =
-DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
-INSTALLARCHLIB = $(PERLPREFIX)/lib/perl5/5.8.0/i686-linux
-DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
-INSTALLSITEARCH = $(SITEPREFIX)/lib/perl5/site_perl/5.8.0/i686-linux
-DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
-INSTALLVENDORARCH =
-DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
-INSTALLBIN = $(PERLPREFIX)/bin
-DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
-INSTALLSITEBIN = $(SITEPREFIX)/bin
-DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
-INSTALLVENDORBIN =
-DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
-INSTALLSCRIPT = $(PERLPREFIX)/bin
-DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
-INSTALLMAN1DIR = $(PERLPREFIX)/man/man1
-DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
-INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1
-DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
-INSTALLVENDORMAN1DIR =
-DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
-INSTALLMAN3DIR = $(PERLPREFIX)/man/man3
-DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
-INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3
-DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
-INSTALLVENDORMAN3DIR =
-DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
-PERL_LIB = /usr/local/lib/perl5/5.8.0
-PERL_ARCHLIB = /usr/local/lib/perl5/5.8.0/i686-linux
-LIBPERL_A = libperl.a
-FIRST_MAKEFILE = Makefile
-MAKEFILE_OLD = $(FIRST_MAKEFILE).old
-MAKE_APERL_FILE = $(FIRST_MAKEFILE).aperl
-PERLMAINCC = $(CC)
-PERL_INC = /usr/local/lib/perl5/5.8.0/i686-linux/CORE
-PERL = /usr/local/bin/perl
-FULLPERL = /usr/local/bin/perl
-ABSPERL = $(PERL)
-PERLRUN = $(PERL)
-FULLPERLRUN = $(FULLPERL)
-ABSPERLRUN = $(ABSPERL)
-PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
-FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
-ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
-PERL_CORE = 0
-PERM_RW = 644
-PERM_RWX = 755
-
-MAKEMAKER = /usr/local/lib/perl5/5.8.0/ExtUtils/MakeMaker.pm
-MM_VERSION = 6.16
-MM_REVISION = 1.131
-
-# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
-# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
-# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
-# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
-FULLEXT = PerlIO/via/Unidecode
-BASEEXT = Unidecode
-PARENT_NAME = PerlIO::via
-DLBASE = $(BASEEXT)
-VERSION_FROM = lib/PerlIO/via/Unidecode.pm
-OBJECT =
-LDFROM = $(OBJECT)
-LINKTYPE = dynamic
-
-# Handy lists of source code files:
-XS_FILES =
-C_FILES =
-O_FILES =
-H_FILES =
-MAN1PODS =
-MAN3PODS = lib/PerlIO/via/Unidecode.pm
-
-# Where is the Config information that we are using/depend on
-CONFIGDEP = $(PERL_ARCHLIB)$(DIRFILESEP)Config.pm $(PERL_INC)$(DIRFILESEP)config.h
-
-# Where to build things
-INST_LIBDIR = $(INST_LIB)/PerlIO/via
-INST_ARCHLIBDIR = $(INST_ARCHLIB)/PerlIO/via
-
-INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)
-INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
-
-INST_STATIC =
-INST_DYNAMIC =
-INST_BOOT =
-
-# Extra linker info
-EXPORT_LIST =
-PERL_ARCHIVE =
-PERL_ARCHIVE_AFTER =
-
-
-TO_INST_PM = lib/PerlIO/via/Unidecode.pm
-
-PM_TO_BLIB = lib/PerlIO/via/Unidecode.pm \
- blib/lib/PerlIO/via/Unidecode.pm
-
-
-# --- MakeMaker platform_constants section:
-MM_Unix_VERSION = 1.41
-PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
-
-
-# --- MakeMaker tool_autosplit section:
-# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
-AUTOSPLITFILE = $(PERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)'
-
-
-
-# --- MakeMaker tool_xsubpp section:
-
-
-# --- MakeMaker tools_other section:
-SHELL = /bin/sh
-CHMOD = chmod
-CP = cp
-MV = mv
-NOOP = $(SHELL) -c true
-NOECHO = @
-RM_F = rm -f
-RM_RF = rm -rf
-TEST_F = test -f
-TOUCH = touch
-UMASK_NULL = umask 0
-DEV_NULL = > /dev/null 2>&1
-MKPATH = $(PERLRUN) "-MExtUtils::Command" -e mkpath
-EQUALIZE_TIMESTAMP = $(PERLRUN) "-MExtUtils::Command" -e eqtime
-ECHO = echo
-ECHO_N = echo -n
-UNINST = 0
-VERBINST = 0
-MOD_INSTALL = $(PERLRUN) -MExtUtils::Install -e 'install({@ARGV}, '\''$(VERBINST)'\'', 0, '\''$(UNINST)'\'');'
-DOC_INSTALL = $(PERLRUN) "-MExtUtils::Command::MM" -e perllocal_install
-UNINSTALL = $(PERLRUN) "-MExtUtils::Command::MM" -e uninstall
-WARN_IF_OLD_PACKLIST = $(PERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist
-
-
-# --- MakeMaker makemakerdflt section:
-makemakerdflt: all
- $(NOECHO) $(NOOP)
-
-
-# --- MakeMaker dist section:
-TAR = tar
-TARFLAGS = cvf
-ZIP = zip
-ZIPFLAGS = -r
-COMPRESS = gzip -5f
-SUFFIX = gz
-SHAR = shar
-PREOP = $(NOECHO) $(NOOP)
-POSTOP = $(NOECHO) $(NOOP)
-TO_UNIX = $(NOECHO) $(NOOP)
-CI = ci -u
-RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
-DIST_CP = best
-DIST_DEFAULT = tardist
-DISTNAME = PerlIO-via-Unidecode
-DISTVNAME = PerlIO-via-Unidecode-1.01
-
-
-# --- MakeMaker macro section:
-
-
-# --- MakeMaker depend section:
-
-
-# --- MakeMaker cflags section:
-
-
-# --- MakeMaker const_loadlibs section:
-
-
-# --- MakeMaker const_cccmd section:
-
-
-# --- MakeMaker post_constants section:
-
-
-# --- MakeMaker pasthru section:
-
-PASTHRU = LIB="$(LIB)"\
- LIBPERL_A="$(LIBPERL_A)"\
- LINKTYPE="$(LINKTYPE)"\
- PREFIX="$(PREFIX)"\
- OPTIMIZE="$(OPTIMIZE)"\
- PASTHRU_DEFINE="$(PASTHRU_DEFINE)"\
- PASTHRU_INC="$(PASTHRU_INC)"
-
-
-# --- MakeMaker special_targets section:
-.SUFFIXES: .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
-
-.PHONY: all config static dynamic test linkext manifest
-
-
-
-# --- MakeMaker c_o section:
-
-
-# --- MakeMaker xs_c section:
-
-
-# --- MakeMaker xs_o section:
-
-
-# --- MakeMaker top_targets section:
-all :: pure_all manifypods
- $(NOECHO) $(NOOP)
-
-
-pure_all :: config pm_to_blib subdirs linkext
- $(NOECHO) $(NOOP)
-
-subdirs :: $(MYEXTLIB)
- $(NOECHO) $(NOOP)
-
-config :: $(FIRST_MAKEFILE) $(INST_LIBDIR)$(DIRFILESEP).exists
- $(NOECHO) $(NOOP)
-
-config :: $(INST_ARCHAUTODIR)$(DIRFILESEP).exists
- $(NOECHO) $(NOOP)
-
-config :: $(INST_AUTODIR)$(DIRFILESEP).exists
- $(NOECHO) $(NOOP)
-
-$(INST_AUTODIR)/.exists :: /usr/local/lib/perl5/5.8.0/i686-linux/CORE/perl.h
- $(NOECHO) $(MKPATH) $(INST_AUTODIR)
- $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.8.0/i686-linux/CORE/perl.h $(INST_AUTODIR)/.exists
-
- -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_AUTODIR)
-
-$(INST_LIBDIR)/.exists :: /usr/local/lib/perl5/5.8.0/i686-linux/CORE/perl.h
- $(NOECHO) $(MKPATH) $(INST_LIBDIR)
- $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.8.0/i686-linux/CORE/perl.h $(INST_LIBDIR)/.exists
-
- -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_LIBDIR)
-
-$(INST_ARCHAUTODIR)/.exists :: /usr/local/lib/perl5/5.8.0/i686-linux/CORE/perl.h
- $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
- $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.8.0/i686-linux/CORE/perl.h $(INST_ARCHAUTODIR)/.exists
-
- -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR)
-
-config :: $(INST_MAN3DIR)$(DIRFILESEP).exists
- $(NOECHO) $(NOOP)
-
-
-$(INST_MAN3DIR)/.exists :: /usr/local/lib/perl5/5.8.0/i686-linux/CORE/perl.h
- $(NOECHO) $(MKPATH) $(INST_MAN3DIR)
- $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.8.0/i686-linux/CORE/perl.h $(INST_MAN3DIR)/.exists
-
- -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_MAN3DIR)
-
-help:
- perldoc ExtUtils::MakeMaker
-
-
-# --- MakeMaker linkext section:
-
-linkext :: $(LINKTYPE)
- $(NOECHO) $(NOOP)
-
-
-# --- MakeMaker dlsyms section:
-
-
-# --- MakeMaker dynamic section:
-
-dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
- $(NOECHO) $(NOOP)
-
-
-# --- MakeMaker dynamic_bs section:
-
-BOOTSTRAP =
-
-
-# --- MakeMaker dynamic_lib section:
-
-
-# --- MakeMaker static section:
-
-## $(INST_PM) has been moved to the all: target.
-## It remains here for awhile to allow for old usage: "make static"
-static :: $(FIRST_MAKEFILE) $(INST_STATIC)
- $(NOECHO) $(NOOP)
-
-
-# --- MakeMaker static_lib section:
-
-
-# --- MakeMaker manifypods section:
-
-POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
-POD2MAN = $(POD2MAN_EXE)
-
-
-manifypods : pure_all \
- lib/PerlIO/via/Unidecode.pm \
- lib/PerlIO/via/Unidecode.pm
- $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW)\
- lib/PerlIO/via/Unidecode.pm $(INST_MAN3DIR)/PerlIO::via::Unidecode.$(MAN3EXT)
-
-
-
-
-# --- MakeMaker processPL section:
-
-
-# --- MakeMaker installbin section:
-
-
-# --- MakeMaker subdirs section:
-
-# none
-
-# --- MakeMaker clean_subdirs section:
-clean_subdirs :
- $(NOECHO) $(NOOP)
-
-
-# --- MakeMaker clean section:
-
-# Delete temporary files but do not touch installed files. We don't delete
-# the Makefile here so a later make realclean still has a makefile to use.
-
-clean :: clean_subdirs
- -$(RM_RF) ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all $(INST_ARCHAUTODIR)/extralibs.ld perlmain.c tmon.out mon.out so_locations pm_to_blib *$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT) $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def lib$(BASEEXT).def $(BASEEXT).exp $(BASEEXT).x core core.*perl.*.? *perl.core core.[0-9] core.[0-9][0-9] core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9][0-9]
- -$(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
-
-
-# --- MakeMaker realclean_subdirs section:
-realclean_subdirs :
- $(NOECHO) $(NOOP)
-
-
-# --- MakeMaker realclean section:
-
-# Delete temporary files (via clean) and also delete installed files
-realclean purge :: clean realclean_subdirs
- $(RM_RF) $(INST_AUTODIR) $(INST_ARCHAUTODIR)
- $(RM_RF) $(DISTVNAME)
- $(RM_F) blib/lib/PerlIO/via/Unidecode.pm $(MAKEFILE_OLD) $(FIRST_MAKEFILE)
-
-
-# --- MakeMaker metafile section:
-metafile :
- $(NOECHO) $(ECHO) '# http://module-build.sourceforge.net/META-spec.html' > META.yml
- $(NOECHO) $(ECHO) '#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#' >> META.yml
- $(NOECHO) $(ECHO) 'name: PerlIO-via-Unidecode' >> META.yml
- $(NOECHO) $(ECHO) 'version: 1.01' >> META.yml
- $(NOECHO) $(ECHO) 'version_from: lib/PerlIO/via/Unidecode.pm' >> META.yml
- $(NOECHO) $(ECHO) 'installdirs: site' >> META.yml
- $(NOECHO) $(ECHO) 'requires:' >> META.yml
- $(NOECHO) $(ECHO) ' strict: 0' >> META.yml
- $(NOECHO) $(ECHO) ' Text::Unidecode: 0' >> META.yml
- $(NOECHO) $(ECHO) ' utf8: 0' >> META.yml
- $(NOECHO) $(ECHO) '' >> META.yml
- $(NOECHO) $(ECHO) 'distribution_type: module' >> META.yml
- $(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.16' >> META.yml
-
-
-# --- MakeMaker metafile_addtomanifest section:
-metafile_addtomanifest:
- $(NOECHO) $(PERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
- -e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"'
-
-
-# --- MakeMaker dist_basics section:
-distclean :: realclean distcheck
- $(NOECHO) $(NOOP)
-
-distcheck :
- $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
-
-skipcheck :
- $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
-
-manifest :
- $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
-
-veryclean : realclean
- $(RM_F) *~ *.orig */*~ */*.orig
-
-
-
-# --- MakeMaker dist_core section:
-
-dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
- $(NOECHO) $(PERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
- -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';'
-
-tardist : $(DISTVNAME).tar$(SUFFIX)
- $(NOECHO) $(NOOP)
-
-uutardist : $(DISTVNAME).tar$(SUFFIX)
- uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
-
-$(DISTVNAME).tar$(SUFFIX) : distdir
- $(PREOP)
- $(TO_UNIX)
- $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
- $(RM_RF) $(DISTVNAME)
- $(COMPRESS) $(DISTVNAME).tar
- $(POSTOP)
-
-zipdist : $(DISTVNAME).zip
- $(NOECHO) $(NOOP)
-
-$(DISTVNAME).zip : distdir
- $(PREOP)
- $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
- $(RM_RF) $(DISTVNAME)
- $(POSTOP)
-
-shdist : distdir
- $(PREOP)
- $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
- $(RM_RF) $(DISTVNAME)
- $(POSTOP)
-
-
-# --- MakeMaker distdir section:
-distdir : metafile metafile_addtomanifest
- $(RM_RF) $(DISTVNAME)
- $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
- -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
-
-
-
-# --- MakeMaker dist_test section:
-
-disttest : distdir
- cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
- cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
- cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
-
-
-# --- MakeMaker dist_ci section:
-
-ci :
- $(PERLRUN) "-MExtUtils::Manifest=maniread" \
- -e "@all = keys %{ maniread() };" \
- -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
- -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
-
-
-# --- MakeMaker install section:
-
-install :: all pure_install doc_install
-
-install_perl :: all pure_perl_install doc_perl_install
-
-install_site :: all pure_site_install doc_site_install
-
-install_vendor :: all pure_vendor_install doc_vendor_install
-
-pure_install :: pure_$(INSTALLDIRS)_install
-
-doc_install :: doc_$(INSTALLDIRS)_install
-
-pure__install : pure_site_install
- $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-
-doc__install : doc_site_install
- $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-
-pure_perl_install ::
- $(NOECHO) $(MOD_INSTALL) \
- read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \
- write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \
- $(INST_LIB) $(DESTINSTALLPRIVLIB) \
- $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
- $(INST_BIN) $(DESTINSTALLBIN) \
- $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
- $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
- $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
- $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
- $(SITEARCHEXP)/auto/$(FULLEXT)
-
-
-pure_site_install ::
- $(NOECHO) $(MOD_INSTALL) \
- read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
- write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
- $(INST_LIB) $(DESTINSTALLSITELIB) \
- $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
- $(INST_BIN) $(DESTINSTALLSITEBIN) \
- $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
- $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
- $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
- $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
- $(PERL_ARCHLIB)/auto/$(FULLEXT)
-
-pure_vendor_install ::
- $(NOECHO) $(MOD_INSTALL) \
- read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \
- write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \
- $(INST_LIB) $(DESTINSTALLVENDORLIB) \
- $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
- $(INST_BIN) $(DESTINSTALLVENDORBIN) \
- $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
- $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
- $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
-
-doc_perl_install ::
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" "$(INSTALLPRIVLIB)" \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
- >> $(DESTINSTALLARCHLIB)/perllocal.pod
-
-doc_site_install ::
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" "$(INSTALLSITELIB)" \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
- >> $(DESTINSTALLARCHLIB)/perllocal.pod
-
-doc_vendor_install ::
- $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
- -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
- -$(NOECHO) $(DOC_INSTALL) \
- "Module" "$(NAME)" \
- "installed into" "$(INSTALLVENDORLIB)" \
- LINKTYPE "$(LINKTYPE)" \
- VERSION "$(VERSION)" \
- EXE_FILES "$(EXE_FILES)" \
- >> $(DESTINSTALLARCHLIB)/perllocal.pod
-
-
-uninstall :: uninstall_from_$(INSTALLDIRS)dirs
-
-uninstall_from_perldirs ::
- $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist
-
-uninstall_from_sitedirs ::
- $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
-
-uninstall_from_vendordirs ::
- $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist
-
-
-# --- MakeMaker force section:
-# Phony target to force checking subdirectories.
-FORCE:
- $(NOECHO) $(NOOP)
-
-
-# --- MakeMaker perldepend section:
-
-
-# --- MakeMaker makefile section:
-
-# We take a very conservative approach here, but it's worth it.
-# We move Makefile to Makefile.old here to avoid gnu make looping.
-$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
- $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
- $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
- $(NOECHO) $(RM_F) $(MAKEFILE_OLD)
- $(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
- -$(MAKE) -f $(MAKEFILE_OLD) clean $(DEV_NULL) || $(NOOP)
- $(PERLRUN) Makefile.PL
- $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
- $(NOECHO) $(ECHO) "==> Please rerun the make command. <=="
- false
-
-
-
-# --- MakeMaker staticmake section:
-
-# --- MakeMaker makeaperl section ---
-MAP_TARGET = perl
-FULLPERL = /usr/local/bin/perl
-
-$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
- $(MAKE) -f $(MAKE_APERL_FILE) $@
-
-$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
- $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
- $(NOECHO) $(PERLRUNINST) \
- Makefile.PL DIR= \
- MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
- MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
-
-
-# --- MakeMaker test section:
-
-TEST_VERBOSE=0
-TEST_TYPE=test_$(LINKTYPE)
-TEST_FILE = test.pl
-TEST_FILES = t/*.t
-TESTDB_SW = -d
-
-testdb :: testdb_$(LINKTYPE)
-
-test :: $(TEST_TYPE)
-
-test_dynamic :: pure_all
- PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
-
-testdb_dynamic :: pure_all
- PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
-
-test_ : test_dynamic
-
-test_static :: test_dynamic
-testdb_static :: testdb_dynamic
-
-
-# --- MakeMaker ppd section:
-# Creates a PPD (Perl Package Description) for a binary distribution.
-ppd:
- $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="1,01,0,0">' > $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <TITLE>$(DISTNAME)</TITLE>' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <ABSTRACT>a perlio layer for Unidecode</ABSTRACT>' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <AUTHOR></AUTHOR>' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <DEPENDENCY NAME="Text-Unidecode" VERSION="0,0,0,0" />' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <DEPENDENCY NAME="strict" VERSION="0,0,0,0" />' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <DEPENDENCY NAME="utf8" VERSION="0,0,0,0" />' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <OS NAME="$(OSNAME)" />' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="i686-linux" />' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
-
-
-# --- MakeMaker pm_to_blib section:
-
-pm_to_blib: $(TO_INST_PM)
- $(NOECHO) $(PERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')'\
- lib/PerlIO/via/Unidecode.pm blib/lib/PerlIO/via/Unidecode.pm
- $(NOECHO) $(TOUCH) $@
-
-# --- MakeMaker selfdocument section:
-
-
-# --- MakeMaker postamble section:
-
-
-# End.
@@ -46,11 +46,8 @@ DESCRIPTION
SEE ALSO
Text::Unidecode
-
PerlIO::via
-
Encode and Encode::Supported
-
PerlIO::via::PinyinConvert
NOTES
@@ -58,9 +55,9 @@ NOTES
things besides.
COPYRIGHT AND DISCLAIMER
- Copyright 2003, Sean M. Burke sburke@cpan.org, all rights reserved. This
- program is free software; you can redistribute it and/or modify it under
- the same terms as Perl itself.
+ Copyright 2003, 2014, Sean M. Burke sburke@cpan.org, all rights reserved.
+ This program is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
The programs and documentation in this dist are distributed in the hope
that they will be useful, but without any warranty; without even the
@@ -69,32 +66,17 @@ COPYRIGHT AND DISCLAIMER
AUTHOR
Sean M. Burke sburke@cpan.org
-
-
-
INSTALLATION
-You install PerlIO::via::Unidecode, as you would install any perl module
-library, by running these commands:
-
- perl Makefile.PL
- make
- make test
- make install
-
-If you want to install a private copy of PerlIO::via::Unidecode in
-your home directory, then you should try to produce the initial
-Makefile with something like this command:
-
- perl Makefile.PL LIB=~/perl
-
-See perldoc perlmodinstall for more information on installing modules.
+* For using the "CPAN Plus" system, read: perldoc cpanp
+* For old-style "make" interface, read: perldoc perlmodinstall
DOCUMENTATION
-POD-format documentation is included in Unidecode.pm. POD is readable
-with the 'perldoc' utility. See ChangeLog for recent changes.
+POD-format documentation is included in PerlIO/via/Unidecode.pm.
+POD is readable with the 'perldoc' utility.
+See ChangeLog for recent changes.
SUPPORT
@@ -1,7 +1,8 @@
require 5.008;
package PerlIO::via::Unidecode;
-$VERSION = "1.01";
+# Last-Modified Time-stamp: "2014-07-27 02:49:16 MDT sburke@cpan.org"
+$VERSION = "1.02";
use strict;
use utf8 ('decode');
use Text::Unidecode ('unidecode');
@@ -29,27 +30,37 @@ sub WRITE {
1;
__END__
+=encoding utf8
+
=head1 NAME
PerlIO::via::Unidecode - a perlio layer for Unidecode
=head1 SYNOPSIS
+ # An example program using the perlio layer:
+
% cat utf8translit
#!/usr/bin/perl
use strict;
use PerlIO::via::Unidecode;
- foreach my $f (@ARGV) {
- open IN, '<:encoding(utf8):via(Unidecode)', $f or die "$f -> $!\n";
- print while <IN>;
- close(IN);
+ foreach my $fs (@ARGV) {
+ open( my $IN,
+ '<:encoding(utf8):via(Unidecode)', # the layers
+ $fs
+ ) or die "$f -> $!\n";
+ print while <$IN>;
+ close($IN);
}
__END__
+ # We're feeding it this file, which is the Chinese
+ # characters for Beijing (in UTF8)
+
% od -x home_city.txt
000000: E5 8C 97 E4 BA B0 0D 0A
-I<that's the the Chinese characters for Beijing, in UTF8>
+ So:
% utf8translit home_city.txt
Bei Jing
@@ -68,19 +79,23 @@ feeds it to Unidecode, which then outputs an ASCII transliteration:
#!/usr/bin/perl
use strict;
use PerlIO::via::Unidecode;
- foreach my $f (@ARGV) {
- open IN, '<:encoding(koi8-r):via(Unidecode)', $f or die $!;
- print while <IN>;
- close(IN);
+ foreach my $filespec (@ARGV) {
+ open( # Three-argument open is always great
+ my $IN,
+ '<:encoding(koi8-r):via(Unidecode)', # the layers
+ $filespec ) or die $!;
+
+ print while <$IN>;
+ close($IN);
}
__END__
% cat fet_koi8r.txt
- ëÏÇÄÁ ÞÉÔÁÌÁ ÔÙ ÍÕÞÉÔÅÌØÎÙÅ ÓÔÒÏËÉ,
- çÄÅ ÓÅÒÄÃÁ Ú×ÕÞÎÙÊ ÐÙÌ ÓÉÑÎØÅ ÌØÅÔ ËÒÕÇÏÍ
- é ÓÔÒÁÓÔÉ ÒÏËÏ×ÏÊ ×ÚÄÙÍÁÀÔÓÑ ÐÏÔÏËÉ,-
- îÅ ×ÓÐÏÍÎÉÌÁ ÌØ Ï ÞÅÍ?
+ ëÏÇÄÁ ÞÉÔÁÌÁ ÔÙ ÍÕÞÉÔÅÌØÎÙÅ ÓÔÒÏËÉ,
+ çÄÅ ÓÅÒÄÃÁ Ú×ÕÞÎÙÊ ÐÙÌ ÓÉÑÎØÅ ÌØÅÔ ËÒÕÇÏÍ
+ é ÓÔÒÁÓÔÉ ÒÏËÏ×ÏÊ ×ÚÄÙÍÁÀÔÓÑ ÐÏÔÏËÉ,-
+ îÅ ×ÓÐÏÍÎÉÌÁ ÌØ Ï ÞÅÍ?
% transkoi8r fet_koi8r.txt
@@ -100,19 +115,23 @@ see.
% cat writebei.pl
use PerlIO::via::Unidecode;
- open OUT, ">:via(Unidecode):utf8", "rombei.txt" or die $!;
- print OUT "\x{5317}\x{4EB0}\n";
+ open(
+ my $OUT,
+ ">:via(Unidecode):utf8", # the layers
+ "roman_bei.txt"
+ ) or die $!;
+ print $OUT "\x{5317}\x{4EB0}\n";
# those are the Chinese characters for Beijing
- close(OUT);
+ close($OUT);
% perl writebei.pl
- % cat rombei.txt
+ % cat roman_bei.txt
Bei Jing
=head1 FUNCTIONS AND METHODS
-This module provides no public functions or methods --
+This module provides no public functions or methods —
everything is done thru the C<via> interface. If you want a function,
see L<Text::Unidecode>.
@@ -123,7 +142,7 @@ get the case right.
Don't type "Unicode" when you mean "Unidecode", nor vice versa.
-Handy modes to remember:
+Handy layer-modes to remember:
<:encoding(utf8):via(Unidecode)
<:encoding(some-other-encoding):via(Unidecode)
@@ -140,16 +159,60 @@ implement are called as "C<:encodI<ing>(...)>").
L<PerlIO::via::PinyinConvert>
+L<perlunitut> and L<perlunicode>
+
+L<https://en.wikipedia.org/wiki/Afanasy_Fet>
+
=head1 NOTES
+Note that if Unidecode's transliteration of something changes, so will
+its effect on C<:via(Unidecode)>. So the first word of the
+above text is "Koghda" from one particular version of Unidecode, and
+"Kogda" from another.
+
Thanks for Jarkko Hietaniemi for help with this module and many
other things besides.
+=head1 THE POEM
+
+In the first release of this module, I forgot to give the source
+of the above Russian text! So here it is:
+
+The Russian text is the first stanza of a poem by Afanasy Afanasevich
+Fet (1822-1892).
+Above I have shown only its first stanza ("Koghda chitala..."), first
+in raw KOI8R, then passed through Unidecode. But here it is, in its
+entirety:
+
+ Когда читала ты мучительные строки,
+ Где сердца звучный пыл сиянье льёт кругом
+ И страсти роковой вздымаются потоки,—
+ Не вспомнила ль о чём?
+
+ Я верить не хочу! Когда в степи, как диво,
+ В полночной темноте безвременно горя,
+ Вдали перед тобой прозрачно и красиво
+ Вставала вдруг заря.
+
+ И в эту красоту невольно взор тянуло,
+ В тот величавый блеск за тёмный весь предел,—
+ Ужель ничто тебе в то время не шепнуло:
+ «Там человек сгорел!»
+
+
+ —Афанасий Афанасьевич Фет, 15 февраля 1887
+
+
+Its conventional English title is a translation of the first line,
+"When you were reading those tormented lines"— which I found
+rather apt for a poem about mangled encodings.
+
=head1 COPYRIGHT AND DISCLAIMER
-Copyright 2003, Sean M. Burke sburke@cpan.org, all rights reserved. This
-program is free software; you can redistribute it and/or modify it under
-the same terms as Perl itself.
+With the exception of the text of the poem, this is copyright 2003,
+2014, Sean M. Burke sburke@cpan.org, all rights reserved. This program
+is free software; you can redistribute it and/or modify it under the
+same terms as Perl itself.
The programs and documentation in this dist are distributed in the hope
that they will be useful, but without any warranty; without even the
@@ -161,27 +224,3 @@ Sean M. Burke sburkeE<64>cpan.org
=cut
-
-# Gratuitous poetry:
-#
-# Leave of Grass: "Song of Myself" -- Walt Whitman
-#
-#
-# You shall no longer take things at second or third hand, nor look
-# through the eyes of the dead, nor feed on the spectres in books.
-#
-# You shall not look through my eyes either, not take things from me.
-#
-# You shall listen to all sides and filter them from yourself.
-#
-# I mind them or the show or resonance of them - I come and I depart.
-#
-# These are really the thoughts of all men in all ages and lands, they are
-# not original with me,
-#
-# If they are not yours as much mine they are nothing, or next to nothing.
-#
-# If they not the riddle and the untiying of the riddle they are nothing.
-#
-# If they are not just as close as they are distant they are nothing.
-
@@ -1,12 +1,10 @@
+# -*- coding:utf-8; mode:CPerl -*-
+use strict; use warnings; use Test; BEGIN {plan tests => 2};
-#
-# "[Samuel] Johnson's aesthetic judgments are almost invariably subtle or
-# solid or bold; they always have some good quality to recommend them,
-# except one: they are never right." -Lytton Strachey
-#
-
-use Test;
-BEGIN {plan tests => 2};
+print "#\n# I am ", __FILE__, "\n# ",
+ q[ with Time-stamp: "2014-07-27 02:25:03 MDT sburke@cpan.org"],
+ "\n#\n",
+;
ok 1;
require PerlIO::via::Unidecode;
@@ -30,48 +28,3 @@ print "# Using Test.pm version ", $Test::VERSION || "nil", "\n";
ok 1;
-
-
-
-# Gratuitous poetry:
-#
-# "Sailing to Byzantium"
-#
-# William Butler Yeats, 1927
-#
-# That is no country for old men. The young
-# In one another's arms, birds in the trees
-# - Those dying generations - at their song,
-# The salmon falls, the mackerel-crowded seas,
-# Fish, flesh or fowl, commend all summer long
-# Whatever is begotten, born and dies.
-# Caught in that sensual music all neglect
-# Monuments of unaging intellect.
-#
-# An aged man is but a paltry thing,
-# A tattered coat upon a stick, unless
-# Soul clap its hands and sing, and louder sing
-# For every tatter in its mortal dress,
-# Nor is there singing school but studying
-# Monuments of its own magnificence;
-# And therefore I have sailed the seas and come
-# To the holy city of Byzantium.
-#
-# O sages standing in God's holy fire
-# As in the gold mosaic of a wall,
-# Come from the holy fire, perne in a gyre,
-# And be the singing-masters of my soul.
-# Consume my heart away; sick with desire
-# And fastened to a dying animal
-# It knows not what it is; and gather me
-# Into the artifice of eternity.
-#
-# Once out of nature I shall never take
-# My bodily form from any natural thing,
-# But such a form as Grecian goldsmiths make
-# Of hammered gold and gold enamelling
-# To keep a drowsy emperor awake;
-# Or set upon the golden bough to sing
-# To lords and ladies of Byzantium
-# Of what is past, or passing, or to come.
-
@@ -1,94 +1,75 @@
+# -*- coding:utf-8; mode:CPerl -*-
+#======================================================================
-use Test;
-BEGIN {plan tests => 3};
+use strict; use Test; BEGIN {plan tests => 6};
+print "#\n# I am ", __FILE__, "\n# ",
+ q[ with Time-stamp: "2014-07-27 02:24:45 MDT sburke@cpan.org"],
+ "\n#\n",
+;
ok 1;
require PerlIO::via::Unidecode;
use strict;
-my $fet = "ëÏÇÄÁ ÞÉÔÁÌÁ ÔÙ\nÍÕÞÉÔÅÌØÎÙÅ ÓÔÒÏËÉ\n";
+my $fet_raw_koi8 = join '', map( chr(hex($_)),
+ q[
+ eb cf c7 c4 c1 20 de c9 d4 c1 cc c1 20 d4 d9
+ 0a
+ cd d5 de c9 d4 c5 cc d8 ce d9 c5 20 d3 d4 d2 cf cb c9
+ ]
+ =~ m<(\S+)>g )
+;
-my $f = 'koi8r.txt';
-open FET, ">", $f or die "Can't write-open $f: $!";
-print FET $fet;
-close(FET);
+# That's the KOI-8 encoding of the first line of the poem "When you were
+# reading those tormented lines" by Afanasy Afanasevich Fet.
-open IN, '<:encoding(koi8-r):via(Unidecode)', $f or die $!;
-my $x = join '', <IN>;
-close(IN);
-$x =~ s/^\s+//s;
-$x =~ s/\s+$//s;
-$x =~ s/\s+/ /g;
-ok $x, "Koghda chitala ty muchitiel'nyie stroki";
-# open IN, '<:encoding(koi8-r):via(Unidecode)', $f or die $!;
-# open OUT, ">:via(Unidecode):utf8", "rombei.txt" or die $!;
-# <:encoding(utf8):via(Unidecode)
-# <:encoding(some-other-encoding):via(Unidecode)
-# >:via(Unidecode):utf8
+my $fet_fs = 'koi8r.txt';
+{
+ print "# Creating time file $fet_fs\n";
+ open my $FET, ">", $fet_fs or die "Can't write-open $fet_fs: $!";
+ binmode($FET) or die "Can't binmode $fet_fs - $!";
-unlink $f;
+ print "# Writing ", length($fet_raw_koi8), " bytes of KOI8 to it.\n";
+ print $FET $fet_raw_koi8;
+ ok 1;
-ok 1;
+ close($FET) or die "Can't close write-file $fet_fs - $!";
+ ok 1;
+}
+
+my $unidecoded;
+{
+ my $Layer = '<:encoding(koi8-r):via(Unidecode)';
+ print "#Opening $fet_fs with layer: $Layer\n";
+ open(
+ my $IN,
+ $Layer,
+ $fet_fs
+ ) or die $!;
+ $unidecoded = join '', readline($IN);
+ die "Can't read from $fet_fs" unless $unidecoded;
+ close($IN);
+ $unidecoded =~ s/^\s+//s;
+ $unidecoded =~ s/\s+$//s;
+ $unidecoded =~ s/\s+/ /g;
+}
+ok $unidecoded, qr/\S+/; # basic sanity: that it has content
+# It should be something like: "Koghda chitala ty muchitiel'nyie stroki"
+{
+ my $u = $unidecoded;
+ $u =~ s/\n//g;
+ print "# Got: $u\n";
+}
+ok( $unidecoded, qr/^Kog .+ tala .+ strok .+ /msx );
+# If Unidecode's Cyrillic tables change, then the precise transliteration
+# could change. But I'm just betting on at least those things being okay.
-# Gratuitous poetry:
-#
-# "To his Coy Mistress" by Andrew Marvell
-#
-#
-# Had we but world enough, and time,
-# This coyness, lady, were no crime.
-# We would sit down and think which way
-# To walk, and pass our long love's day;
-# Thou by the Indian Ganges' side
-# Shouldst rubies find; I by the tide
-# Of Humber would complain. I would
-# Love you ten years before the Flood;
-# And you should, if you please, refuse
-# Till the conversion of the Jews.
-# My vegetable love should grow
-# Vaster than empires, and more slow.
-# An hundred years should go to praise
-# Thine eyes, and on thy forehead gaze;
-# Two hundred to adore each breast,
-# But thirty thousand to the rest;
-# An age at least to every part,
-# And the last age should show your heart.
-# For, lady, you deserve this state,
-# Nor would I love at lower rate.
-#
-# But at my back I always hear
-# Time's winged chariot hurrying near;
-# And yonder all before us lie
-# Deserts of vast eternity.
-# Thy beauty shall no more be found,
-# Nor, in thy marble vault, shall sound
-# My echoing song; then worms shall try
-# That long preserv'd virginity,
-# And your quaint honour turn to dust,
-# And into ashes all my lust.
-# The grave's a fine and private place,
-# But none I think do there embrace.
-#
-# Now therefore, while the youthful hue
-# Sits on thy skin like morning dew,
-# And while thy willing soul transpires
-# At every pore with instant fires,
-# Now let us sport us while we may;
-# And now, like am'rous birds of prey,
-# Rather at once our time devour,
-# Than languish in his slow-chapp'd power.
-# Let us roll all our strength, and all
-# Our sweetness, up into one ball;
-# And tear our pleasures with rough strife
-# Thorough the iron gates of life.
-# Thus, though we cannot make our sun
-# Stand still, yet we will make him run.
-#
-# [end]
+unlink $fet_fs or die "Can't unlink temp-file $fet_fs - $!";
+ok 1;