in reply to Re: OO style: Placement of "new"
in thread OO style: Placement of "new"
This is not completely indirect object syntax:
print $log "It works!\n" if $object->is_valid();You would instead write:
print $log "It works!\n" if is_valid $object;Your second snippet would likewise be:
$log->print( "It works!\n" ) if $obj->is_valid();I fail to see how that is less appealing.
|
|---|