Help with syntax ... Object::InsideOut

J

jps

Hi!

I am trying to grasp the "design pattern" of Object::InsideOut and was
reading this:
http://search.cpan.org/~jdhedden/Object-InsideOut-3.52/lib/Object/InsideOut.pod

Looking at the code-examples, I see things like

my @data
:Field
:Type(numeric)
:Accessor(data);

and

sub init :Init

etc.

What are these syntactic elements ":Field" and ":Init" ?
And what do they mean?

I cannot remember having seen those ":Xxxx" constructs before...
What do you call these elements, so I know what to google for? :)

Thanks for help!

/JP
 
A

A. Sinan Unur

Hi!

I am trying to grasp the "design pattern" of Object::InsideOut and was
reading this:
http://search.cpan.org/~jdhedden/Object-InsideOut- 3.52/lib/Object/InsideOut.pod

Looking at the code-examples, I see things like

my @data
:Field
:Type(numeric)
:Accessor(data);
....

What are these syntactic elements ":Field" and ":Init" ?
And what do they mean?

They are called attributes.

http://search.cpan.org/~jdhedden/Object-InsideOut-
3.52/lib/Object/InsideOut.pod#ATTRIBUTES

There are some built-in attributes as well:

http://perldoc.perl.org/attributes.html

Sinan
--
A. Sinan Unur <[email protected]>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top