Skip to content

Instantly share code, notes, and snippets.

/datetime Secret

Created April 29, 2017 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d874b159bbeb0090a9fc19658a8ac4a9 to your computer and use it in GitHub Desktop.
Save anonymous/d874b159bbeb0090a9fc19658a8ac4a9 to your computer and use it in GitHub Desktop.
Can't modify constant item in scalar assignment, near $dt
use DateTime;
my $dt = DateTime->now;
# later, in my route:
$self->stash(datetime = $dt);
# results in the error message above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment