Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Where to put self-made loop logic (separate module)?

by davido (Archbishop)
on Dec 30, 2012 at 17:56 UTC ( #1010948=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Where to put self-made loop logic (separate module)?
in thread Where to put self-made loop logic (separate module)?

Does the format of the input data have a name? Is the input data format documented somewhere?


Dave


Comment on Re^3: Where to put self-made loop logic (separate module)?
Re^4: Where to put self-made loop logic (separate module)?
by basic6 (Novice) on Dec 30, 2012 at 20:50 UTC
    The input is (part of) a template. In other words, it's just human-readable text, no code (no Perl, no HTML). There may be a couple of lines, each starting with an asterisk - that's what my function parses.
    But that's probably not important, as my goal is to have a line-by-line loop structure which allows in-place modifications. For that matter, the input is guaranteed to always be UTF-8 encoded text (only printable characters and whitespaces).

      With the parsing logic embedded, it seems like a very specific tool that targets an uncommon input format. That's not "generally useful", and probably doesn't make for a great CPAN candidate.

      If you write the loop such that one could pass in a subref, it might be a more generalized tool, but then it's just a loop, and I don't see much advantage to it.

      This isn't to say you're not onto something. I just think it would require that you decide what exactly you want your module to accomplish. Throughout this thread I just see a module that handles a specific type of data that nobody else is likely to need to handle.


      Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010948]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-09-23 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls