Help with syntax ... Object::InsideOut

Discussion in 'Perl Misc' started by jps, Dec 10, 2008.

  1. jps

    jps Guest

    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
     
    jps, Dec 10, 2008
    #1
    1. Advertising

  2. jps <> wrote in
    news::

    > 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 <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, Dec 10, 2008
    #2
    1. Advertising

  3. jps

    jps Guest

    Re: Help with syntax ... Object::InsideOut

    On Dec 10, 2:44 pm, "A. Sinan Unur" <> wrote:
    > jps <> wrote innews::
    >
    > > 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 <>
    > (remove .invalid and reverse each component for email address)
    >
    > comp.lang.perl.misc guidelines on the WWW:http://www.rehabitation.com/clpmisc/


    Thanks Sinan!
    Very helpful!
    /JP
     
    jps, Dec 10, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gabriele renzi
    Replies:
    2
    Views:
    238
    gabriele renzi
    Dec 31, 2005
  2. Ken Bloom
    Replies:
    3
    Views:
    243
  3. Good Night Moon
    Replies:
    9
    Views:
    316
    Rick DeNatale
    Jul 25, 2007
  4. Jacob Grover
    Replies:
    5
    Views:
    351
    Jacob Grover
    Jul 18, 2008
  5. Mark Richards
    Replies:
    3
    Views:
    348
    Tad McClellan
    Nov 18, 2007
Loading...

Share This Page