in reply to Method Calls on multiple objects
Nice module, L~R, but I'm just not seeing how this is inherently better than using what Perl already gives you.
#! /usr/bin/perl use strict; package Dog; sub new { my $class = shift; my $self = {}; return bless $self, $class; } sub bark { print "Woof!\n"; } package main; my $fido = Dog->new(); my $woofy = Dog->new(); $_->bark for ( $fido, $woofy );
Is this not just as effective? Or am I missing something?
_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who would like to seem profound to the crowd strive for obscurity. --Friedrich Nietzsche
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Method Calls on multiple objects
by Limbic~Region (Chancellor) on Mar 27, 2004 at 14:48 UTC |
In Section
Seekers of Perl Wisdom