#
# Locale::Script - ISO codes for script identification (ISO 15924)
#
# $Id: Script.pm,v 2.2 2002/07/10 16:33:28 neilb Exp $
#
use strict;
require 5.002;
require Exporter;
use Carp;
#-----------------------------------------------------------------------
# Public Global Variables
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
# Private Global Variables
#-----------------------------------------------------------------------
my $CODES = [];
my $COUNTRIES = [];
#=======================================================================
#
# code2script ( CODE [, CODESET ] )
#
#=======================================================================
sub code2script
{
my $code = shift;
return undef unless defined $code;
#-------------------------------------------------------------------
# Make sure the code is in the right form before we use it
# to look up the corresponding script.
# We have to sprintf because the codes are given as 3-digits,
# with leading 0's. Eg 070 for Egyptian demotic.
#-------------------------------------------------------------------
if ($codeset == LOCALE_CODE_NUMERIC)
{
return undef if ($code =~ /\D/);
}
else
{
}
{
}
else
{
#---------------------------------------------------------------
# no such script code!
#---------------------------------------------------------------
return undef;
}
}
#=======================================================================
#
# script2code ( SCRIPT [, CODESET ] )
#
#=======================================================================
sub script2code
{
my $script = shift;
return undef unless defined $script;
{
}
else
{
#---------------------------------------------------------------
# no such script!
#---------------------------------------------------------------
return undef;
}
}
#=======================================================================
#
# script_code2code ( CODE, IN-CODESET, OUT-CODESET )
#
#=======================================================================
sub script_code2code
{
(@_ == 3) or croak "script_code2code() takes 3 arguments!";
my $code = shift;
my $inset = shift;
my $outset = shift;
my $outcode;
my $script;
return undef if not defined $script;
return $outcode;
}
#=======================================================================
#
# all_script_codes()
#
#=======================================================================
sub all_script_codes
{
}
#=======================================================================
#
# all_script_names()
#
#=======================================================================
sub all_script_names
{
}
#=======================================================================
#
# initialisation code - stuff the DATA into the ALPHA2 hash
#
#=======================================================================
{
my $script;
local $_;
while (<DATA>)
{
next unless /\S/;
chop;
if ($alpha3)
{
}
if ($numeric)
{
}
}
close(DATA);
}
1;