Subject: | Bug report: Archive Har |
Date: | Thu, 4 Sep 2014 15:45:34 +0200 |
To: | bug-Archive-Har [...] rt.cpan.org |
From: | Junaid Shaikh <junaidahmed83 [...] gmail.com> |
Hi,
I am trying to use module Archive::Har version 0.05 for reading a har file
but I am receiving an error. Could you kindly help with the making it work
and remove the bug I am coming across?
Thanks a lot for the help.
*Error:*
, or } expected while parsing object/hash, at character offset 1 (before
"\n") at /Library/Perl/5.10.0/Archive/Har.pm line 72.
*Operating system:*
Mac OS 10.8.0 Darwin Kernel Version 10.8.0:
*Per version:*
5.10.0
*Perl Code I am running:*
#!/usr/bin/perl –w
use strict;
use Archive::Har;
use Perl6::Slurp;
use JSON;
### Header row
print "Page,Timestamp,ResponseTime\n";
### Print a data row for each harfile we pass in.
for my $file (@ARGV)
{
my $har = Archive::Har->new();
$har->string(slurp($file));
for my $page ($har->pages())
{
print join(",", $page->title(), $page->startedDateTime(),
$page->pageTimings->onLoad() ) . "\n";
}
}
Best regards,
Junaid