Acme-constant

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN

  Change: 0d546f48b16280c1abbcfc046f760d5a9c2f353c
  Author: Konrad Borowski <glitchmr@myopera.com>
  Date : 2013-09-21 10:10:19 +0000

    Release Acme-constant 0.1.1. 

  Change: 4a9266d9edc838e7337fae90828514978df91dbb
  Author: Konrad Borowski <glitchmr@myopera.com>
  Date : 2013-09-21 10:09:45 +0000

    Change error messages to be in Perl-style, and add diagnostics. 

  Change: 0eb944c3f28b22ed4a1686e563df41e6cb4772fa
  Author: Konrad Borowski <glitchmr@myopera.com>
  Date : 2013-09-21 09:41:41 +0000

    Support OLD Perl versions by returning value after croak.

    Perl isn't clever enough to notice croak throws exception and thinks
    it has to return a value. Now fake value is returned as lvalue - the
    only way to access it however is modifying `Carp::croak` to not throw

lib/Acme/constant.pm  view on Meta::CPAN

    print "Second element of list is ", (LIST)[1], ".\n";
    (LIST) = (4, 5, 6);
    print "But now, the second element is ", (LIST)[1], "\n";

=head1 DESCRIPTION

This pragma lets you make inconstant constants, just like the constants
the users of Ruby or Opera (before Opera 14, that is) already enjoyed.

Unlike Perl constants, that are replaced at compile time, Acme
constants, in true dynamic programming language style, can be modified
even after declaration.

Just like constants generated with standard C<use constant> pragma, the
constants declared with C<use Acme::Constant> don't have any sigils.
This makes using constants easier, as you don't have to remember what
sigil do constants use.

=head1 NOTES

As the Perl compiler needs to know about which barewords are keywords,



( run in 1.190 second using v1.01-cache-2.11-cpan-49f99fa48dc )