Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: How do I go from procedural to object oriented programming?by marinersk (Priest) |
on Apr 20, 2015 at 23:03 UTC ( [id://1124081]=note: print w/replies, xml ) | Need Help?? |
Okay. You've defined a Class called Movies. The next step will probably be somewhat familiar to you, especially if you've used Perl Modules that are OO. You're ready to start mucking about with your first movie object -- Firefly. my $movie = Movies->new(title=>"Firefly"); I may have the syntax wrong -- as I've already indicated, I don't do OO except when required, and then I beat the Synopsis examples with a cudgel until I get something out of it that seems to do what I want. But you -- Brave OO soldier that you are -- now you have created a movieobject from the Moviesclass. You can do stuff with it now.
In Section
Seekers of Perl Wisdom
|
|