Data-Alias reviews

cpanratings
 

RSS | Module Info | Add a review of Data-Alias

Data-Alias (1.18) *****

Very useful module for avoiding expensive copies of large strings.

Data-Alias (1.16) ****

If you can use Method::Signatures instead, then do!

As the Method::Signatures said: "This is done using the amazing Data::Alias module."

If you can't use Method::Signatures (like me on Windows at the moment), then Data::Alias will help: I use it all the time. It enables me to pass Arrays and Hashes as references into subroutines, without having to worry about whether they are references to Arrays, Hashes, Objects, or Scalars later. With Data::Alias i just alias them when i receive them in the subroutine, like this :
sub my_method {

alias %hash_argument = %{shift()};

alias @list_argument = %{shift()};

# and carry on, using %hash_argument and @list_argument as usual
}

edit: i took my note down from 5 to 4 for this reason: [Method::Signatures] is the modern way to do what Data::Alias does. It is very possible, though, that i have missed some other great uses of Data::Alias.

Data-Alias (1.15) *****

A truly excellent module worthy of a five-star review. This module saves you from the headache of typing lengthy deref syntax to access deeply-nested data without copying, by providing an 'alias' keyword that lets you attach a lexical to any value. alias can also take a block in which aliasing semantics will be turned on. A great tool; I wish I had known about it earlier.