The following module was proposed for inclusion in the Module List: modid: File::Parser::Role DSLIP: RdpOp description: Contains code commonly used in file parsers userid: TORBJORN (Torbjørn Lindahl) chapterid: 21 (File_Handle_Input_Output) communities: github
similar: Surprisingly few modules deal with this, havent really found any rationale: Every time I sit down to write code for parsing files according to a particular format, I end up repeating some pieces of code over and over: * Make Moo accept a one argument filename instead of a { file => hash } * check that the file exists and has size * make it accept file handles also * make it accept references to content * have it run the parser method in constructor so i dont have to bother calling a parse method every time i create the object. can of course turn this off if need be. Then, and only then, can I start with the fun bits, which is actually writing the code to do the actual parsing. All of the above keeps getting in the way. With this module its history :) enteredby: TORBJORN (Torbjørn Lindahl) enteredon: Wed Dec 17 16:20:13 2014 UTC The resulting entry would be: File::Parser:: ::Role RdpOp Contains code commonly used in file parsers TORBJORN Thanks for registering, -- The PAUSE PS: The following links are only valid for module list maintainers: Registration form with editing capabilities: https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=1f010000_7d3d38239194ab7a&SUBMIT_pause99_add_mod_preview=1 Immediate (one click) registration: https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=1f010000_7d3d38239194ab7a&SUBMIT_pause99_add_mod_insertit=1 Peek at the current permissions: https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=File%3A%3AParser%3A%3ARole