Created
February 22, 2012 14:48
-
-
Save rsimoes/1885397 to your computer and use it in GitHub Desktop.
Long-winded linearly typed variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dump; | |
use Data::Alias "alias"; | |
use Scalar::Util qw(weaken isweak); | |
my $foo = ["a".."z"]; | |
alias my @bar = @$foo; | |
weaken $foo; | |
undef $foo; | |
dd \@bar; # ["a".."z"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment