This may be better in Meditations - if you have the power to move it and think it should be moved...go ahead!
I've lost count of how many times I've created a module and got this error...
I know exactly how to solve it - simply ensure that there is a true value, usually 1 as the last line of code in the module.Radar/API.pm did not return a true value at index.pl line 14.
I suspect that almost everyone who has written more than a couple of modules has forgotten this line and got this error.
So why is it part of Perl?
I've been doing some digging and found that it's not just me that finds it frustrating but I have not found an explanation as to why Perl was created like this. Surely there must be a reason for it...
So it got me thinking...
Is there ever a time when one might read the true value and see what it is - i.e 1, 6 or 10?
Is there ever a time when one might want it to return false? I can't imagine this as it's a vague and drastic error. If for some reason, the module cannot be used on the architecture or in the environment then surely a nicer error would be more appropriate.
In reply to Modules return value by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |