Why's that? It works ;-)hello $a;
#!/usr/bin/perl use warnings; use strict; package Foo; sub new { return bless {},shift; } sub hello { print "hello"; } package main; sub new { print "haha"; return; } sub hello { print "Hi, $_[0]!"; } my $a = new Foo; hello $a; __END__ Hi, Foo=HASH(0x814bd48)!
In reply to Re^7: Is it ok to mix functional and oo programming in one package?
by rhesa
in thread Is it ok to mix functional and oo programming in one package?
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |