Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Object oriented perl

by Anonymous Monk
on Mar 24, 2005 at 03:42 UTC ( #441948=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

hey, my script are still stuck in the days of non-object oriented perl programming

a proffesor friend of mine mentioned how to create objects with the package keyword

what is the syntax to create what I guess woudl be the perl equivalent of a c++ class?

also, he mentioned a perl module which does graphics. what is the name of this library, and does anyone have any info on how to use it?

Replies are listed 'Best First'.
Re: Object oriented perl
by duct_tape (Hermit) on Mar 24, 2005 at 03:59 UTC

    You will want to read the perlboot and perltoot man pages for more information on perl object oriented programming. They should have come with your installation of perl, if not then you can find them here Another good source of information on object oriented perl is the book Object Oriented Perl by Damian Conway.

    For the modules that do graphics, there are quite a few. The most common two are GD and Image::Magick.

Re: Object oriented perl
by chas (Priest) on Mar 24, 2005 at 05:07 UTC
    Conways's book mentioned already is great, but for a simple first introduction, Randal Schwartz's book "Learning Perl Objects, References & Modules" (O'Reilly) is very nice! I read the whole book over a weekend for review and learned a lot.
      His uses of Mister Ed and Gillians Island kind of scared me. Not that I thought they were bad examples. It scared me because I actually knew what he was talking about and had watched those shows as a kid. It made me realize how old I am getting...
Re: Object oriented perl
by perlfan (Vicar) on Mar 24, 2005 at 06:00 UTC
    my script are still stuck in the days of non-object oriented perl programming

    This is not necessarily a bad thing.

    Regardless, Damian Conway's book on Object Oriented Perl is extremely useful - even for non-oo features of Perl since you have to understand a few advanced topics to appreciate how Perl achieves oo-ness.
Re: Object oriented perl
by Anonymous Monk on Mar 24, 2005 at 04:19 UTC
Perl Graphics (was...Re: Object oriented perl)
by satchm0h (Beadle) on Mar 24, 2005 at 15:05 UTC
    Your OO perl question as been addressed....go ye and read merlyn's book.

    I thought I would try and shed some light on your postscript concering graphics in perl. As far as I know there is not a graphics library written entirely in perl, but rather a few modules that are built on top of other libraries.

    For the 2D side of things, take a look at the GD bundle of modules and the various modules built on top of them.

    If you are feeling a bit more adventurous and want to dive into the 3D side of things, try reading Geoff Broadwell's articles over at (1, 2, 3). He leverages SDL::App and SDL::OpenGL.

    A bit terse...but to the point I hope.

    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://441948]
Approved by Tanktalus
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2023-09-26 01:33 GMT
Find Nodes?
    Voting Booth?

    No recent polls found