[Bug 11037] New: C4::Biblio exports non-existent subroutines
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 Bug ID: 11037 Summary: C4::Biblio exports non-existent subroutines Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: gmcharlt@gmail.com Reporter: colin.campbell@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl C4/Biblio.pm exports two subroutine names Get and TransformHtmlToMarc2 which do not correspond to actual subroutines. They should be removed from @EXPORT -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |colin.campbell@ptfs-europe. | |com --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 21959 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21959&action=edit Proposed patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- I wrote the following test and ran it before and after the patch. As expected, the routines were exported before (notice the text is &C4::Biblio), but they were undefined. After the patch, they are no longer in C4::Biblio (notice the text is now &main::), and are still undefined. mtompset@ubuntu:~/kohaclone$ cat ~/test_missing.t #!/usr/bin/perl use Modern::Perl; use Test::More tests => 3; use Try::Tiny; BEGIN { use_ok('C4::Biblio'); } my $check1 = try { Get(); } catch { "$_"; } finally { "ok"; }; print "CHECK: $check1\n"; ok( $check1 =~ /Undefined/ , "Get() is undefined." ); my $check2 = try { TransformHtmlToMarc2(); } catch { "$_"; } finally { "ok"; }; print "CHECK: $check2\n"; ok( $check2 =~ /Undefined/ , "TransformHtmlToMarc2() is undefined." ); mtompset@ubuntu:~/kohaclone$ prove -v ~/test_missing.t /home/mtompset/test_missing.t .. 1..3 ok 1 - use C4::Biblio; CHECK: Undefined subroutine &C4::Biblio::Get called at /home/mtompset/test_missing.t line 11. ok 2 - Get() is undefined. CHECK: Undefined subroutine &C4::Biblio::TransformHtmlToMarc2 called at /home/mtompset/test_missing.t line 16. ok 3 - TransformHtmlToMarc2() is undefined. ok All tests successful. Files=1, Tests=3, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.22 cusr 0.00 csys = 0.23 CPU) Result: PASS mtompset@ubuntu:~/kohaclone$ git bz apply 11037 Bug 11037 - C4::Biblio exports non-existent subroutines 21959 - Proposed patch Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 11037 Remove non-existent subs from Biblio's @EXPORT mtompset@ubuntu:~/kohaclone$ prove -v ~/test_missing.t /home/mtompset/test_missing.t .. 1..3 ok 1 - use C4::Biblio; CHECK: Undefined subroutine &main::Get called at /home/mtompset/test_missing.t line 11. ok 2 - Get() is undefined. CHECK: Undefined subroutine &main::TransformHtmlToMarc2 called at /home/mtompset/test_missing.t line 16. ok 3 - TransformHtmlToMarc2() is undefined. ok All tests successful. Files=1, Tests=3, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.21 cusr 0.00 csys = 0.22 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 21963 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21963&action=edit [SIGNED OFF] Bug 11037 Remove non-existent subs from Biblio's @EXPORT No code implements the subs Get and TransformHtmlToMarc2 so dont export them into users' namespace Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21959|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 21959 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21959 Proposed patch Obsoleting non-signed off version. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- I also tried doing greps to see if they were defined anywhere else in the code. There were no such routines anywhere. $ grep TransformHtmlToMarc2 `find .` $ grep "sub Get" `find .` | less Lots of GetBlah's, but nothing that was just "sub Get". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 --- Comment #6 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 22157 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22157&action=edit Bug 11037 Remove non-existent subs from Biblio's @EXPORT No code implements the subs Get and TransformHtmlToMarc2 so dont export them into users' namespace Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11037 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Colin! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org