Since I started working in the middle of the Community Bonding Period, there was not much to do to the module in the week #1. However, some progress was made with the module. For now, the module
Script.pm is fully capable of writing a dancer app from the call of the script
bin/dancer. These was the expected work for the week #1.
What I worked on the week #1?
Well basically, moving the functions to object-oriented methods. We all know that by default in almost every module, you add
Module->new(%args)->run; and the methods. From that I also moved the functions from
set_*, for example,
set_lib_path in the new object constructor. You can find more detail in the most recent commit I made in my github account.
What I learned in the week #1?
I learned to appreciate steps and instructions, for the second time I screwed up my repo, and all because I thought moving and stripping functions would reduce work. When in reality, I was just adding more work and steps. Reinvention of the wheel destroys, and it takes the most precious hours of your day. On another side,
git is the tool of the year for me. I love to sync and clone repositories in my two netbooks, any change can be updated in any local repo in matter of seconds.
Related to Perl code, I learned that idiomatic pragmas and other idiosyncrasies are great for refactoring, but not for rough drafting. I guess Perl sticks to the Unix philosophy point, which tell us that simple is better. However, I think that a more idiomatic code is more maintainable, but I don’t want to start a debate, I just want to keep learning. I guess, time and work will tell. As of working habits, I made better use of
man for any Perl related documentation. I bought Modern Perl and Effective Perl Programming, and both books are next to my keyboard on a daily basis. The chapter “Objects” in
Modern Perl helped me to grasp what was essentially needed to migrate the functions to object methods, and adding the new class object. Most doubts on the topic, were later answered by
franck in the middle of my commits revisions.
For week #2, the tasks are as follows:
- Migrate the script to an Object Oriented module.
- Write tests for the OO Module.
- If needed, refactor and modify the module.
From what you can read, the first point is already completed. But these works great for me, since it gives more time to study and learn from the testing settings that Dancer modules work with. I’ve barely played with tests before, and I think this is a great time to start working on a topic I lack knowledge of.
Because the module rough draft was written in a quick matter,
sawyer decided to modify the project schedule, and add other tasks according to the time and the work done. You can find the new project schedule in my GSoC section.