in reply to What version of Strawberry Perl to use?
That particular message usually comes from using a sub designed to be used as an object method as a class method instead.
Quick demo:
use v5.10; use strict; use warnings; { package Local::Class; sub new { my $class = shift; my %self = @_; bless \%self => $class; } sub foo { my $self = shift; return $self->{foo}; } } my $object = Local::Class->new(foo => 42); say $object->foo; my $foo = Local::Class->foo;
So that's what that error message means. It's not especially Perl version dependent though, so I can't imagine upgrading to a newer version of Perl will fix this particular bug.
Though in general I'd always recommend running the latest stable version of Perl possible; currently 5.16.2.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What version of Strawberry Perl to use?
by gepebril69 (Scribe) on Feb 08, 2013 at 18:02 UTC | |
by Anonymous Monk on Feb 09, 2013 at 09:20 UTC | |
by gepebril69 (Scribe) on Feb 09, 2013 at 11:47 UTC |