Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Trying to learn how to build a module

by stefan k (Curate)
on Feb 02, 2001 at 19:59 UTC ( [id://56007]=note: print w/replies, xml ) Need Help??


in reply to Trying to learn how to build a module

Hi
Just one week ago I started writing my first module, thus my knowledge may not be that of a Saint ...
Nevertheless
First I believe you have to give your module a name by provding a line like

package mytest;

Then I understood that an instance of that Class/Package would keep it's contents in a hash, thus I'd put the name-variable in this hash:

sub new { my $class = shift; my $self = {}; my $self->{name} = ""; # later assign this var with 'Yoda' bless $self,$class; return $self; }

Hope this helps.

Regards
Stefan K

$dom = "skamphausen.de"; ## May The Open Source Be With You! $Mail = "mail@$dom; $Url = "http://www.$dom";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://56007]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-03-19 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found