LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   procedural equivalent of OOP in Perl (https://www.linuxquestions.org/questions/programming-9/procedural-equivalent-of-oop-in-perl-4175437982/)

electronpusher 11-20-2012 11:29 AM

procedural equivalent of OOP in Perl
 
Hi Ho !
I have been using Perl 5.10 and I recently tried Perl 5.14. I am truly allergic to OOP. In 5.10 this works:
Digest::MD5::addfile($md5, *FILE);
I VERY much prefer the above to:
$md5->addfile(*FILE);
In Perl 5.14 it does not work. Any way to make it work?

Thanks for ANY ideas--- but I have a feeling it is a lost cause--- and maybe I am just complaining for nothing ....

Sergei Steshenko 11-20-2012 02:58 PM

Quote:

Originally Posted by electronpusher (Post 4833410)
Hi Ho !
I have been using Perl 5.10 and I recently tried Perl 5.14. I am truly allergic to OOP. In 5.10 this works:
Digest::MD5::addfile($md5, *FILE);
I VERY much prefer the above to:
$md5->addfile(*FILE);
In Perl 5.14 it does not work. Any way to make it work?

Thanks for ANY ideas--- but I have a feeling it is a lost cause--- and maybe I am just complaining for nothing ....

You need to show what exactly doesn't work.

And you can install the needed module(s) locally (And even build Perl locally to start from, i.e. as non-root user), and insert the diagnostic 'print' statements ('warn' statements) in order to debug it.

Or use Perl debugger.


All times are GMT -5. The time now is 09:44 PM.