I am currently learning Perl by using it in my dissertation (best way to learn it I find!) and at one point I ended up writing code that meant I was creating hundreds and thousands of objects. I am still unsure if it was completely due to the amount of object creation, but my tool ended up taking about half a day to run as opposed to the 30 seconds it took when I switched to using simple hashes for each "object".
How time-efficient is the "bless" function and everything that comes with it? And does calling a method for example $car->tyres take longer than the alternative $car->{tyres}? In the same vein, is it ever worth creating simple objects when all I'm really doing is simply adding methods to access and set its "fields"?
Thanks for your help,
Matt| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |