Bug 11058: fix compilation warning in C4::Record
authorColin Campbell <colin.campbell@ptfs-europe.com>
Wed, 16 Oct 2013 09:09:12 +0000 (10:09 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 22 Oct 2013 01:21:07 +0000 (01:21 +0000)
A routine declares two lexical variables named $stylesheet.
This patch renames the second to keep code clearer and
avoid propagating compile time warnings

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Record.pm

index 7277f2c..9d72d5a 100644 (file)
@@ -310,9 +310,9 @@ sub _transformWithStylesheet {
     my $xslt = XML::LibXSLT->new();
     my $source = $parser->parse_string($xmlrecord);
     my $style_doc = $parser->parse_file($xslfile);
-    my $stylesheet = $xslt->parse_stylesheet($style_doc);
-    my $results = $stylesheet->transform($source);
-    my $newxmlrecord = $stylesheet->output_string($results);
+    my $style_sheet = $xslt->parse_stylesheet($style_doc);
+    my $results = $style_sheet->transform($source);
+    my $newxmlrecord = $style_sheet->output_string($results);
     return ($newxmlrecord);
 }