Greetings Mongers, 

After reading a fun post on Dot based "operators" in perl ( 
http://perlhacks.com/2014/01/dots-perl/ ) a few weeks ago I found myself 
getting really into the "yada yada" operator. It's not technically an operator, 
rather "it stands in place of a statement and has no operands" but I have found 
it to be an excellent addition to my TDD tool kit. 

Basically, rather than doing: 

sub do_awesome_thing { 
croak "Not Yet Implemented" 
} 

You can do: 

sub do_even_more_awesome_thing { 
... 
} 

Which will generate the following when ran: 

[rstone@rstone core]$ prove -l t/things/01-that_are_awesome.t 
t/things/01-that_are_awesome.t .. 
# Failed test 'Lives Through Taking Over The World' 
# at t/things/01-that_are_awesome.t line 46. 
# died: Unimplemented at /home/rstone/repos/awesomness/lib/Super/Cool/Module.pm 
line 169. 

Those three dot's take the place of a `die "Unimplemented"` and stand out quite 
a bit more to me as something I need to come back and actually implement. 

Anyway, hope someone else find this helpful or interesting. Feel free to share 
any other nifty tips and tricks you may have come across in recent days. 

Best Regards, 
Robert Stone 
_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/

Reply via email to