Skip to content

Instantly share code, notes, and snippets.

@earino
Created February 27, 2013 23:24
Show Gist options
  • Save earino/5052799 to your computer and use it in GitHub Desktop.
Save earino/5052799 to your computer and use it in GitHub Desktop.
Use Readonly instead of constant
#!/usr/bin/env perl
#
use warnings;
use strict;
use Data::Dumper;
use Readonly;
Readonly my $MY_CONSTANT => 13;
my %foo = ($MY_CONSTANT => 'dingle');
print Dumper \%foo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment