use constant {
zed => 0,
one => 1,
repos => (qw(oss non-oss debug)),
two => 2,
};
####
{
zed => 0,
one => 1,
repos => (qw(oss non-oss debug)),
two => 2,
}
####
c:\@Work\Perl\monks>perl -wMstrict -MData::Dumper -le
"print Dumper {
zed => 0,
one => 1,
repos => (qw(oss non-oss debug)),
two => 2,
};
"
$VAR1 = {
'non-oss' => 'debug',
'repos' => 'oss',
'one' => 1,
'zed' => 0,
'two' => 2
};
####
c:\@Work\Perl\monks>perl -wMstrict -le
"use constant [ qw(a b c d) ];
"
Invalid reference type 'ARRAY' not 'HASH' at -e line 1
BEGIN failed--compilation aborted at -e line 1.
c:\@Work\Perl\monks>perl -wMstrict -le
"use constant qw(A b c d);
print A;
"
bcd