mvhub-dev team mailing list archive
-
mvhub-dev team
-
Mailing list archive
-
Message #00021
Re: [Merge] lp:~leegoodrich/mvhub/create_config_in_mv_setup into lp:mvhub
Review: Resubmit
Thanks for fixing my #KLUDGES.
The design is solid.
This is a step forward.
The big flaw is that subs get access to info globally.
As a rule subs should take info in only through their parameters, not through globals, even global constants.
This contributes to "loose coupling". This has several advantages:
You can cut and paste subs someplace else without having to worry about also copying and pasting the global.
People looking at the sub call have a better idea of what it is doing by looking at the data passed in.
Subs are testable
The small flaw is that:
my @WEBSITE_CODES = qw/ mvh nsp /;
...should be defined at top level and passed in as param, it is easier to modify constants at the top of a file.
If we create a sub that requires this data, that sub can also get it passed in.
--
https://code.launchpad.net/~leegoodrich/mvhub/create_config_in_mv_setup/+merge/22003
Your team mvhub-dev is subscribed to branch lp:mvhub.
References