1) How should I handle unintended input to functions?
If I have a function like so, should I handle unintended input within the function, or depend on the end user to provide the correct input?
sub foo
{
$x = $_[0];
return $x + 10;
}
2) How does one use modules from another folder?
Since I'm from a C++/Java background I (generally speaking) like to organize all of my source code within different folders. How would one lets say have a file tree like so and access all of the modules from Master.pl (how could I use the use command to import the Foo and Bar modules?):
Master.pl Foo | \Foo.pm Bar | \Bar.pm
3) Abstraction in classes.
One of the things I need to, but haven't learned yet; how does one create abstraction in classes. I know in Java one defines it as abstract, but I can't seem to figure it out in Perl.
Anyways, thank you for all of your help!
~Crockeo

New Topic/Question
Reply



MultiQuote





|