Skip Menu |

This queue is for tickets about the Archive-Har CPAN distribution.

Report information
The Basics
Id: 98609
Status: resolved
Priority: 0/
Queue: Archive-Har

People
Owner: Nobody in particular
Requestors: junaidahmed83 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
On Thu Sep 04 23:45:47 2014, junaidahmed83@gmail.com wrote: Show quoted text
> 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
Hi Junaid, I need to see the input file you were loading in order to debug this issue.
Subject: Re: [rt.cpan.org #98609] Bug report: Archive Har
Date: Fri, 5 Sep 2014 11:30:10 +0200
To: bug-Archive-Har [...] rt.cpan.org
From: Junaid Shaikh <junaidahmed83 [...] gmail.com>
Hi, Thanks for reply David. Attached you find two har files. These I use separately as inputs. It is my very first experience of dealing with files of JSON format objects. So I am kind of naive in debugging. Thank you for your help again. Best regards, Junaid On Fri, Sep 5, 2014 at 11:17 AM, David Dick via RT < bug-Archive-Har@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=98609 > > > On Thu Sep 04 23:45:47 2014, junaidahmed83@gmail.com wrote:
> > 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
> > Hi Junaid, > > I need to see the input file you were loading in order to debug this issue. >
Download out.har
application/octet-stream 45.4k

Message body not shown because it is not plain text.

Download support.har
application/octet-stream 388.4k

Message body not shown because it is not plain text.

Subject: Re: Bug report: Archive Har
Date: Fri, 5 Sep 2014 17:43:41 +0200
To: bug-Archive-Har [...] rt.cpan.org
From: Junaid Shaikh <junaidahmed83 [...] gmail.com>
Hi David, The code works now. There was just a small tweek needed. broke the following in two: $har->string(slurp($file)); my $strings=slurp($file); $har->string($strings); Thats it! Best regards, Junaid On Thu, Sep 4, 2014 at 3:45 PM, Junaid Shaikh <junaidahmed83@gmail.com> wrote: Show quoted text
> 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 >
On Sat Sep 06 01:43:51 2014, junaidahmed83@gmail.com wrote: Show quoted text
> Hi David, > The code works now. There was just a small tweek needed. > broke the following in two: > > $har->string(slurp($file)); > > my $strings=slurp($file); > > $har->string($strings); > > Thats it! > > Best regards, > Junaid
Closing this now