Q1. How do I make the constructor return all three data structures, $hashref, @array, and $arrayref when invoked. Is it possible? I understand that only one of these three can be returned by the constructor and not all together. Correct?
A constructor is ment to return a reference to the just created instance of your class, which is of type "ABC".
Q2. I guess with $object1,$object2,$object3, I am creating three different objects. Right? Is there a way by which I create just one object of ABC and through this object I am able to manipulate data in all three data structures of, $hashref, @array, and $arrayref.
Yes, your object will hold those three data structures and provide access to them using methods (the oo term for funtions).
Q3. Do I need to create three different sets of get() and set() functions each to manipulate $hashref, @array, and $arrayref respectively by creating their objects first, ie $object1,$object2,$object3 ?
You could use the functions to manipulate your data structures through them instead of only retrieving them to set them again later. If you don't want / need this, you probably don't need OO for this task at all.
Q4. I understand I can manipulate $hashref, @array, and $arrayref only through access functions like get() and set() and not directly like $object1->$hashref or something like it, am I correct?
You should only access your data through methods. One idea/goal behind OO is to encapsulate your data. Simple accessors/setters/getters may just look like needless typing work, but imagine you want to change the way your data is stored at a later point. By using the encapsulation you can do so without having to change any code that is using your class (could be a lot!) by only altering your class.
Q5. (...) Perhaps, the nested structure might make the program slower, yes/no?
See Answer to Q2 and Q3 for the first part of your question. For program speed you should be aware that OO will most likely have a negative impact. The main purpose why to use OO is structure, maintainability, code reuse and the like over program speed.

Hope I could provide some useful hints.

In reply to Re: On Perl Objects! by Golo
in thread On Perl Objects! by newbio

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.