As far as I understand these packages simplify the workaround I sketched...

> If you keep both %employees and $employees in the same scope it would provide a (really ugly) way of keeping the original array|hash and its blessed reference

yeah indeed ugly, thats what I meant.

> I don't this is some 'problem' which requires the use of slow modules like autobox ...

Contrary to the believe of the group that flames against me, I'm not propagating autobox as an existing solution! (I was asking a question in another thread about autobox and hit the nerve of a group of united fanboys. But I'm tired to repeat this!)

I was talking about the theoretical benefits JS has over Perl in this respect, because there a hash acn be treated as object right from the beginning.

Tieing this hash provides the same functionality in Perl like altering the object in JS (Phase 2)

BTW: According to the docs, autobox isn't slower than method calls on blessed references. >or some wholesale re-invention of Perl symbology.

A Sigil for each Ref-Type would open a lot of simplifications for problems newbies face when starting to learn Perl.

Believe it or not, many people stop and hate Perl just because of these problems...long before even entering a level allowing to understand Data::AsObject and Hash::AutoHash.

Many thanx for your contribution, it's one of the better ones lifting the level of this discussion! :)

Cheers Rolf


In reply to Re^2: Benefits of everything is an object? Or new sigils? by LanX
in thread Benefits of everything is an object? Or new sigils? by LanX

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.