[Koha-devel] Restructuring C4

Colin Campbell colin.campbell at ptfs-europe.com
Wed Apr 6 10:18:26 CEST 2011


On 06/04/11 05:11, Robin Sheat wrote:

> Oh, something else that's recommended that I tend to do is not export
> anything by default, requiring the module to be included like:
>  use C4::Accounts qw/ get_users_balance /;
> mostly this prevents surprising things getting into your namespace. This
> is more a style suggestion though.
More than style I think it generally accepted as good practice and
should be encouraged. One of the downsides of just using default export
lists apart from general namespace pollution is it gets hard to know
what you are using from module X (and sometimes on further investigation
it turns out to be nothing!)
Colin

-- 
Colin Campbell
Chief Software Engineer,
PTFS Europe Limited
Content Management and Library Solutions
+44 (0) 845 557 5634 (phone)
+44 (0) 7759 633626  (mobile)
colin.campbell at ptfs-europe.com
skype: colin_campbell2

http://www.ptfs-europe.com


More information about the Koha-devel mailing list