Oh, you are so on the nail on this... I've gotten into a habit of doing this instead of writting pseudo-code:
# authenticate user
AuthenticateUser($foo,$bar)
or die('Could not authenticate user');
# a while later...
# do some stuff
SomeStuff($more,@params)
or die('Could not do more stuff cause reason');
# subs from here down
########################
sub AuthenticateUser {
return(1);
}
sub SomeStuff {
return(1);
}
I tend to code this way especially when I'm discussing the program with colleages. Then we all get a copy and each one goes out to fill in his/her respective blanks. In the end, I believe the result is usually very clear and quite maintainable!
#!/home/bbq/bin/perl
# Trust no1!