in reply to Re: can('SUPER::defaults')
in thread can('SUPER::defaults')
And just to be dangerous (it's cheaper than a motorcycle):#!/usr/bin/perl -w use strict; package Obj; sub new { bless({}, $_[0]); } sub can { my $self = shift; warn "Called can in Obj.n"; $self->SUPER::can(@_); } package main; my $o = Obj->new(); print $o->can('new'), "\n", UNIVERSAL::can($o, 'new'), "\n";
Try to catch this before it eats up your memory.package UNIVERSAL; sub new { bless({}, $_[0]); } sub loop { my $self = shift; $self->SUPER::loop(); } package main; Universal->new->loop();
|
|---|