Subject: | Default handling breaks with the string "5..10" |
Date: | Mon, 5 Aug 2013 18:37:27 -0700 |
To: | bug-MooX-ClassAttribute [...] rt.cpan.org |
From: | Rob Bloodgood <rob [...] exitexchange.com> |
I'm using WWW::Mechanize::Sleepy, which optionally takes a parameter of the
form "1..3" to delay for a random number of seconds between the first and
second value.
I tried using MooX::CA with this:
class_has sleepiness => (is => 'ro', default => '5..10');
But that dies with:
Can't use string ("5..10") as a subroutine ref while "strict refs" in use
at /usr/local/share/perl/5.14.2/Method/Generate/ClassAccessor.pm line 34.
The same thing happens if I set the attribute is => 'rw'.
If I use is => 'lazy', it doesn't throw the error.