in reply to Return a Reference or Array?

One way to keep people from getting confused when using your module is to have different versions of the methods or subroutines whose names make it clear what is returned. Compare, for example, the DBI methods fetchrow_array and fetchrow_arrayref.

Another way to help avoid the confusion is to, as mentioned already, return the ref in scalar context and the array in list context consistently across all your data-returning methods or subs and to document the fact that it is always that way across the whole API as part of your API documentation.