Skip Menu |

This queue is for tickets about the subs-parallel CPAN distribution.

Report information
The Basics
Id: 118795
Status: new
Priority: 0/
Queue: subs-parallel

People
Owner: Nobody in particular
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 0.09



Subject: Can't get it to work with objects
This is a stripped down version of what I'm trying to do. Instead of printing 3, I get an uninitialized value. It works fine for me outside of objects: #!/usr/bin/env perl use warnings; use strict; use subs::parallel; my $d = Data::Value->new(3); $d->prime(); print $d->get(), "\n"; package Data::Value; sub new { my $class = shift; my $value = shift; return bless { value => $value }, $class; } sub prime { my $self = shift; $self->{cached} = parallelize { return $self->{value}; }; # If I say "$self->{cached} = $self->{value};" it works fine } sub get { my $self = shift; return $self->{cached}; } 1;