Data::Flow is a module for recipe-based building of hashes. It allows for satisying prerequisite constraints on fields about to be built and allows for fields to be built per the instructions of a supplied closure or sub or method.

I have created an RFC to address the lack of array context sensitivity in Data::Flow and would appreciate your input.

Replies are listed 'Best First'.
Re: RFC for Data::Flow
by knight (Friar) on Mar 25, 2001 at 22:14 UTC
    Thumbs up from this corner on the idea. This functionality would have saved me a lot of repetitious work in past projects, writing numerous accessors.

    However, it looks like your sample data_to_encrypt line has a syntax error that makes it a little non-obvious (to me, anyway) exactly how this would work:
    filter => [ sub { "@_" }, qw(user uid), '@{$_->{$_}} groups') ]
    Looks like there's an extra closing parens at the end of group'), probably from cutting-and-pasting inside the qw() closing parenthesis.

    So you're going to scan each argument string for a -> ("check the field values for dereference syntax"), and then eval it if you find one? Seems sufficient; I can't think of any reason it wouldn't have sufficed for my past purposes.
      1. Thank you, that was a typo
      2. Yes, I will scan for deref syntax in the first 3 chars of the name and evaluate it accordingly
      3. I am glad to hear that some people like this module. I LOVE it... especially the filter option... makes for tight functional-like code.

      Edit: chipmunk 2001-03-29