ref $alias eq "HASH" or
croak "Only HASH reference supported as argument to :alias";
alias ($alias);
+ $promote = 1;
next;
}
if ($alias =~ m{:(\w+)$}) {
alias_file ($1) and $promote = 1;
next;
}
- alias_file ($alias);
+ alias_file ($alias) and $promote = 1;
next;
}
if (substr($arg, 0, 1) eq ':'
{
- use charnames ':full', ":alias" => { mychar1 => "0xE8000",
- mychar2 => 983040, # U+F0000
- mychar3 => "U+100000",
- myctrl => 0x80,
- mylarge => "U+111000",
- };
+ use charnames ":alias" => { mychar1 => "0xE8000",
+ mychar2 => 983040, # U+F0000
+ mychar3 => "U+100000",
+ myctrl => 0x80,
+ mylarge => "U+111000",
+ };
+ is ("\N{PILE OF POO}", chr(0x1F4A9), "Verify :alias alone implies :full");
is ("\N{mychar1}", chr(0xE8000), "Verify that can define hex alias");
is (charnames::viacode(0xE8000), "mychar1", "And that can get the alias back");
is ("\N{mychar2}", chr(0xF0000), "Verify that can define decimal alias");
OPTIONS regex
:alias cannot use existing pragma :full \(reversed order\?\) at
########
-# NAME alias with hashref but no :full
-use warnings;
-use charnames ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
-"Here: \N{e_ACUTE}!\n";
-EXPECT
-OPTIONS regex fatal
-Unknown charname 'e_ACUTE' at - line \d+, within string
-########
# NAME alias with hashref but with :short
use warnings;
no warnings 'void';