Bug#512796: setpgrp() causes: "Can't call method "foo" without a package or object reference"

Marcin Owsiany porridge at debian.org
Fri Jan 23 20:21:24 UTC 2009


Package: perl

The following program dies for me on perl v5.8.8 with:
Can't call method "foo" without a package or object reference at a line 10.

-------------------------------------------------------->8---
package A;
sub new { bless {}, shift }
sub foo { }
sub getref { setpgrp() }

package main;
my $o = A->new;
# my $r = A::getref;
# $o->foo($r);
$o->foo(A::getref);
-------------------------------------------------------->8---

However just uncomment the commented lines, and comment the last one,
and it works! :-O

-- 
Marcin Owsiany <porridge at debian.org>             http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216






More information about the Perl-maintainers mailing list