Figured maybe it was possible to use fields, but only got it to work for functions, not methods... Strangely enough the error occurs at line 8.
package BOGUS ; use fields qw( new ) ; package TEST ; my BOGUS $b ; $b = fields::new("BOGUS") ; @{$b}{keys %TEST::} = @TEST::{keys %TEST::} ; sub new { my $class = shift ; my TEST $self = {} ; bless $self, $class ; print "Runtime!\n" ; bloeb() ; return $self ; } package main ; use strict ; use warnings ; sub tst { my TEST $x ; $x = TEST->new() ; $x->blo() ; } tst() ;
In reply to Re: compiletime checking of valid method calls
by Veltro
in thread compiletime checking of valid method calls
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |