NAME
Acme::Iota - Iota Is Acme
SYNOPSIS
use Acme::Iota;
use constant {
A => iota(ord('A')),
B => iota,
C => iota,
};
STATUS
Stable. No changes expected, but who knows?
DESCRIPTION
Using Acme::Iota imports a per-package counter that increases its value on each call to iota
.
Providing an argument resets the counter to the specified value.
SOURCE CODE
This is quite literally all there is to the module:
sub import {
my $iota = 0;
*{caller.'::iota'} = sub { (@_ ? $iota = shift : $iota)++ };
}
SEE ALSO
The Go Programming Language Specification
COPYRIGHT AND LICENSE
Copyright (C) 2014 by Christoph Gärtner <cygx@cpan.org>
Distributed under the Boost Software License, Version 1.0