File: json-fix-json_options.patch

package info (click to toggle)
libspreadsheet-wright-perl 0.107-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 232 kB
  • sloc: perl: 1,008; makefile: 16
file content (21 lines) | stat: -rw-r--r-- 676 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Fixing passing options to JSON printer.
Author: Andrius Merkys <merkys@debian.org>
Bug: https://github.com/tobyink/p5-spreadsheet-wright/issues/5
--- a/lib/Spreadsheet/Wright/JSON.pm
+++ b/lib/Spreadsheet/Wright/JSON.pm
@@ -72,13 +72,13 @@
 	if (1 == scalar keys %{$self->{'data'}})
 	{
 		$self->{'_FH'}->print(
-			to_json($self->{'data'}->{$self->{'_WORKSHEET'}}, $self->{'json_options'})
+			to_json($self->{'data'}->{$self->{'_WORKSHEET'}}, $self->{'options'}{'json_options'})
 			);
 	}
 	else
 	{
 		$self->{'_FH'}->print(
-			to_json($self->{'data'}, $self->{'json_options'})
+			to_json($self->{'data'}, $self->{'options'}{'json_options'})
 			);
 	}