localized pod?

2003-01-27 Thread Daniel Yacob

I don't suppose there is a way with POD to provide the manual data
based on locale?  I'm thinking along the lines of having translations
of the instructions in several languages, each language block being
marked with a POD command and locale identifier arg.  If its not a part
of the POD system, is there any reason this couldn't be done?

thanks,

/Daniel



[PATCH] correct direction of enc2xs on win32

2003-01-27 Thread Autrijus Tang
The patch below fixes generating Makefile.PL for modules that can
work on Win32, and on versions other than 5.7.3. :)

Thanks,
/Autrijus/

--- Makefile_PL.e2x.origTue Jan 28 06:29:24 2003
+++ Makefile_PL.e2x Tue Jan 28 06:30:25 2003
@@ -20,7 +20,7 @@
 PATHLOOP:
 for my $d (@Config{qw/bin sitebin vendorbin/}, 
   (split /$Config{path_sep}/o, $ENV{PATH})){
-for my $f (qw/enc2xs enc2xs5.7.3/){
+for my $f (map {$_, "$_.bat"} ('enc2xs', "enc2xs$Config{version}")) {
 my $path = File::Spec->catfile($d, $f);
 -r $path and $enc2xs = $path and last PATHLOOP;
 }



msg01657/pgp0.pgp
Description: PGP signature


Re: localized pod?

2003-01-27 Thread David Graff

I wonder whether locale-selected documentation might be easier using
separate (directories of) pod files for each language.  The installation
process would then need to include a step in ./configure that would
identify the appropriate pod set for the current locale, and the
resulting "make install" would do "pod2man" using the chosen set of
sources.  (Likewise, "perldoc" could be adapted so that it is sensitive
to locale when looking for pods corresponding to the modules found in
@INC.)

This might be preferable to having (an indefinite set of) pod
translations concatenated to each source code "*.pm" file in a
distribution.

Dave G.





Re: Handling MacArabic in perl 5.8.0

2003-01-27 Thread David Graff

That is great -- THANK YOU!!  For general reference, I applied the
"decodeMacArabic" module to my test script as shown below, and it works
as desired.  The last few lines of the main "for" loop were added to
confirm that the module properly minimizes the use of "LRO ... PDF" and
"RLO ... PDF" directional controls for contiguous strings of affected 
characters -- a tremendous benefit!  (Note that I'm not working on a 
Mac -- I'm using solaris here, and I just need to cope with data that 
comes from a Mac.)

BTW, I just noticed that the unicode web site now has a more recent 
version of the APPLE/ARABIC.TXT mapping page than the one I cited 
earlier, and the new version offers improved/expanded commentary:
http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ARABIC.TXT
(dated Dec. 19, 2002).

--- enhanced "test-encode.perl", using Tomoyuki's Lingua::MacArabic ---

use strict;
use Encode;
use Lingua::AR::MacArabic;

my $utf8_out;
my @octet_in;

push @octet_in, chr($_) for ( 0x20 .. 0x7e, 0x80 .. 0xff );

for my $table ( qw/cp1256 MacArabic/ )
{
my @succ = ();
my @fail = ();
my @msgs = ();
for ( @octet_in )
{
my $char = $_;
if ( $table eq 'cp1256' ) {
eval "\$utf8_out = decode( \'$table\', \$char, Encode::FB_CROAK )";
} else {
eval "\$utf8_out = decodeMacArabic( \$char )";
}
if ( $@ ) {
push @fail, sprintf( " %2.2x\n", ord( $_ ));
push @msgs, $@;
}
else {
my $uhex = join( ' ', map { sprintf( "%4.4x", ord( $_ )) }
 split( //, $utf8_out ));
push @succ, sprintf( " %2.2x => %s\n", ord( $_ ), $uhex );
}
}
print "decode via $table succeeded on ", scalar @succ, " codes\n";
print join '', @succ if ( @succ );
print "decode via $table failed on ", scalar @fail, " codes\n";
print join '', @fail if ( @fail );

my $bigstring = join( '', @octet_in );
my $ubigstring;
if ( $table eq 'cp1256' ) {
$ubigstring = decode( $table, $bigstring );
} else {
$ubigstring = decodeMacArabic( $bigstring );
}
my $uhex = join( ' ', map { sprintf( "%4.4x", ord( $_ )) } 
 split( //, $ubigstring ));
print $uhex, "\n";
}