Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of jjore (6662)

Thursday July 23, 2009
03:12 PM

Cuneiform version numbers

[ #39338 ]

I was disappointed yesterday to find out I couldn't fully use Sumerian numbers even though I don't know a thing about them. Given the ASCII program:

use 5.010_000;
use strict;
use warnings;
use version qw( qv );
use Devel::Peek qw( Dump );
use charnames qw( :full );
 
binmode STDOUT, ':encoding(utf8)';
eval "use utf8;
    package Booga;
    our \$VERSION = '\N{CUNEIFORM NUMERIC SIGN TWO ASH}';
    \$INC{'Booga.pm'} = 1;
    sub iz { 'Okay!' }
 
    1;
"
  or die $@;
 
eval "use utf8;
    use Booga \N{CUNEIFORM NUMERIC SIGN THREE ASH};
    print Booga::iz(), qq{\\n};
    1;
"
  or die $@;
 
Dump( $Booga::VERSION > 1);
Dump( Booga->VERSION );
Dump( qv( $Booga::VERSION ) );

Several things came out:

  • "\N{CUNEIFORM NUMERIC SIGN TWO ASH}"
       

    •        
    • is numeric according to /\p{Nd}/
             
    • is not numeric according to <=>
             
    • is not numeric according to version::qv
             
    • is not numeric according to Booga->VERSION
         
  • use Booga &#x12409;

    Bareword "&#x12409;" not allowed while "strict subs" in use at (eval 7) line 2.

  • use Booga 2;

    Version string '&#x12409;' contains invalid data; ignoring: '&#x12409;' at (eval 7) line 2.
    Booga version 2 required--this is only version 0 at (eval 7) line 2.

  • $Booga::VERSION > 2

    Argument "\x{12409}" isn't numeric in numeric gt (&gt;) at booga line 27.

  • Booga->VERSION

    Version string '&#x12409;' contains invalid data; ignoring: '&#x12409;' at booga line 28.
     
    SV = PV(0x82ca18) at 0x847b30
      REFCNT = 1
      FLAGS = (POK,pPOK)
      PV = 0x25beb0 "0"\0
      CUR = 1
      LEN = 16

Also, the HTML formatting of this post is defeating me. :-(

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.