http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7417
--- Comment #23 from Jared Camins-Esakov <[email protected]> --- (In reply to comment #22) > If we were to rewrite anything, I agree Moo (at first glance) looks like an > OK candidate. > > http://search.cpan.org/~mstrout/Moo-1.000002/lib/Moo.pm > > However it is not in Debian squeeze yet, so for 3.10 I think we should wait. > http://packages.debian.org/search?keywords=libmoo-perl > > It is going to be in wheezy. I don't know, I think Moo is a good candidate for packaging ourselves, and using that instead of Moose for Solr, etc. It would be easy enough to do the packaging. I just tried it, and unlike when I tried to get Moose to compile, it worked without any major hitches. I did some performance comparisons on Moo and Moose (and Class::Accessor). Here is my test script: #!/usr/bin/perl use [Moo|Moose|Class::Accessor]; print "Hi\n"; When running under NYTProf, I got the following results: Moo: Profile of test.pl for 140ms, executing 2273 statements and 823 subroutine calls in 36 source files and 7 string evals. Moose: Profile of test.pl for 3.34s, executing 112435 statements and 51928 subroutine calls in 112 source files and 153 string evals. Class::Accessor: Profile of test.pl for 42.5ms, executing 525 statements and 106 subroutine calls in 15 source files and 2 string evals. Class::Accessor is clearly way less overhead, and given how basic authority (and bibliographic) records are to Koha, I think that would be a powerful argument in favor of using it. However, Moo is only one order of magnitude slower to load, which I think probably isn't too bad. Moose, of course, is two orders of magnitude more expensive, making simply loading the file take an unacceptably long time. Since we don't support mod_perl, I think it is critical that we maintain CGI-compatibility for Koha. Setting up Plack is much more involved than pointing Apache at the appropriate directory and telling it to use CGI or mod_perl. All of which is a bit of a tangent. I would have no objection to rewriting Koha::Authority and the RecordProcessor stuff to use Moo, if there is a clear reason why it is better than using Class::Accessor. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
