On Jan 7, Gary Hawkins said:

>Unbelievably, I'm actually walking around not fully understanding one or more
>of these:

First, you should read Perl's object documentation.

  perldoc perlobj
  perldoc perltoot

Those two, at the very least, will help.

>Blessed variables

A scalar that has been bless()ed to a specific [class].  See [object].

>Class methods

A [method] that is expected to be invoked by the name of a [class], rather
than by an [object].  Example:

  my $query = CGI->new;

That calls the new() method of the CGI class; 'CGI' is the first argument
to the function.

>Classes

A [package] that is expected to be used in an object-oriented manner.  It
should have (or inherit) a constructor and some other methods.

>Functions

See [subroutine].

>Global variables

See [package variable].  Can also mean one of the "true" global variables,
such as @ARGV, which always refers to the same variable, no matter what
[package] you are in.

>Instance methods

A [method] expected to be invoked by an [object].  Example:

  @entries = $query->param;

Here, the $query [object] calls the param [method]; the first argument to
method() is $query.

>Methods

A fancy name for a [function] that is expected to be used in an object-
oriented manner.

>Objects

A "thingy".  Really.  It's a variable that "belongs" to a [class].

>Package variables

A variable that belongs to a specific [package].  The default [package]
for any program is 'main', so $foo is really $main::foo, where 'main' is
the [package] and '::' is the package-variable separator.  The variable
$File::Find::name is $name in the 'File::Find' [package].

>Packages

A namespace in Perl, denoted by the 'package' keyword.

  package Game::TicTacToe;

>Subroutines

A storable chunk of code that can be invoked multiple times.

>Is there a simple yet comprehensive explanation out there with an example of
>each?  Didn't think so.  Anyone want to take the time to explain it?

Sounds like you could stand some reading of the fine manual.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to