http://www.perlmonks.org?node_id=73049


in reply to Re: Re (tilly) 2: Text::xSV
in thread Text::xSV

Sorry, but I don't buy it.

I think you are overestimating the difficulties of using pack/unpack, underestimating the abilities of the people who are likely to deal with the format and overestimating again the naturalness of interfaces you have grown for other people.

You have also discounted entirely the cost of learning your interface (particularly if someone doesn't know any Perl) and there is a loss of flexibility. You see, abstractions require domain specific knowledge, and they are only worthwhile when they either significantly simplify things, or when you will have the opportunity to use that information over and over again. Neither appears to be the case here.

Plus looking at your example snippet I have to wonder at the amount of pass by reference magic you seem to be fond of. That is not the kind of API I like to write or use.

In short, I don't deal with a lot of fixed position formats. But if I found a need to, I would spend time getting more familiar with perlform and Perl's other native facilities before reaching for these modules.