This queue is for tickets about the IMDB-Film CPAN distribution.

Report information
The Basics
Id:
51240
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
gerph [...] gerph.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.42
Fixed in:
(no value)



Subject: $film->plot() returning invalid results
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1575
Hiya, Simple one to show: my ($film, $year) = ('Freaky Friday', 1995); print "Test '$film' ($year)\n"; my $imdb = new IMDB::Film(crit => $film, year => $year, cache => 1); $plot = $imdb->plot(); $fullplot= $imdb->full_plot(); print "PLOT:\n"; print " $plot\n"; print "FULLPLOT:\n"; print " $fullplot\n"; Writes the 'PLOT' as the value of the keywords - "Remake | Child As Adult | Role Reversal | Mother Daughter Relationship | Sports Team". My fix is to change the code so that the while in sub plot reads: while(my $tag = $parser->get_tag(MAIN_TAG)) { last if $parser->get_text =~ /^plot(?! keywords)/i; } (?!...) is a zero-width negative look-ahead assertion. Might be easier to say eq 'Plot:', but I felt this was more in keeping with how the code was used. However, the change that was made in 0.41->0.42 to support references to other links means that we also have other values. Apply the above change and change the film initialisation line to: my ($film, $year) = ('Freaky Friday', 2003); and we now get: PLOT: An overworked mother and her daughter do not get along. When they switch bodies, each is forced to adapt to the others life for one freaky Friday. full summary | add synopsis ... because the full summary and bits appear as links on the end of the text. If the line in sub plot is changed to: $plot =~ s/\s+full summary \| (full|add) synopsis//; then this appears to strip them quite happily.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-9524-1257788370-1522.51240-0-0@rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 663
On Mon Nov 09 12:16:00 2009, gerph wrote:
Show quoted text
> ... because the full summary and bits appear as links on the end of
the
Show quoted text
> text. If the line in sub plot is changed to: > > $plot =~ s/\s+full summary \| (full|add) synopsis//; > > then this appears to strip them quite happily.
Looks like I spoke to soon on this. Using: my ($film, $year) = ("The Bravados", 1958); results in: PLOT: Jim Douglas has been relentlessly pursuing the four outlaws who murdered his wife, but finds them in jail about to be hanged... more | add synopsis so probably a better regular expression would be: $plot =~ s/\s+(full summary|more) \| (full|add) synopsis//;
MIME-Version: 1.0
X-Spam-Status: No, hits=2.0 required=8.0 tests=DK_SIGNED,HTML_MESSAGE,SPF_PASS,URIBL_SBL
In-Reply-To: <rt-3.6.HEAD-9524-1257788370-1522.51240-5-0@rt.cpan.org>
References: <RT-Ticket-51240@rt.cpan.org> <rt-3.6.HEAD-9524-1257788370-1522.51240-5-0@rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Message-ID: <deadd08a0911110216k5ef0207te0fcaa5ce51912b7@mail.gmail.com>
Content-Type: multipart/alternative; boundary=0015175dd9cef34613047815b6e4
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id E2CCF4D8040 for <bug-IMDB-Film@rt.cpan.org>; Wed, 11 Nov 2009 05:16:11 -0500 (EST)
Received: (qmail 11451 invoked by uid 103); 11 Nov 2009 10:16:11 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 11 Nov 2009 10:16:11 -0000
Received: from mail-bw0-f209.google.com (HELO mail-bw0-f209.google.com) (209.85.218.209) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Wed, 11 Nov 2009 02:16:09 -0800
Received: by bwz1 with SMTP id 1so913771bwz.13 for <bug-IMDB-Film@rt.cpan.org>; Wed, 11 Nov 2009 02:16:06 -0800 (PST)
Received: by 10.204.153.24 with SMTP id i24mr1194612bkw.114.1257934565884; Wed, 11 Nov 2009 02:16:05 -0800 (PST)
Delivered-To: cpan-bug+IMDB-Film@diesel.bestpractical.com
Subject: Re: [rt.cpan.org #51240] $film->plot() returning invalid results
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=uBP6aAww+RqaROFKrZBfqcYT89cYgVPTmamCjL2jCC9kk5i4yFUdUyrDMVGOeqnr6e ERsZtJFgFT2HyslXify/20TCUaFpZuNjNTO57hCSoVVh1ItudY+2nX1NsV7s6vPAs6qj LaMaJX+oDpbz2lCYqEi19FscP1ZBAkdao9w0U=
Return-Path: <stepanov.michael@gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ht7UJuquBljILQupcS/4UuJcblbd4ZvG7gTlEcIMmqs=; b=dqoECV0G+e9QkShr6dr/s38YdOlU1d5RyUjdFfdq+H3S6PSAgMxA6220123c2bS9nE r0x/Um2uNUHzHoQIUwl3Iak1Mbv7XlGFNdeWEEErcv15Qh4Sw5bTDszW0zrzfIC9wNh8 VgyJ/bEhFf1UJFx2yFqlkEW6hS3sA8tWudNN4=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-IMDB-Film@rt.cpan.org
Date: Wed, 11 Nov 2009 12:16:05 +0200
X-Spam-Level: **
To: bug-IMDB-Film@rt.cpan.org
From: Michael Stepanov <stepanov.michael@gmail.com>
RT-Message-ID: <rt-3.6.HEAD-6514-1257934603-200.51240-0-0@rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 1218
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 1832
Hi Justing,

Thanks for the bugreport. I tested all cases you sent me. The function retrieved plot will be fixed to avoid retrieving plot keywords instead. But the issue with displaying "more | add synopsis" is already fixed in 0.42 (at least I got clear plot without those).

On Mon, Nov 9, 2009 at 7:39 PM, Justin Fletcher via RT <bug-IMDB-Film@rt.cpan.org> wrote:
Show quoted text
      Queue: IMDB-Film
On Mon Nov 09 12:16:00 2009, gerph wrote:
> ... because the full summary and bits appear as links on the end of
the
> text. If the line in sub plot is changed to:
>
> $plot =~ s/\s+full summary \| (full|add) synopsis//;
>
> then this appears to strip them quite happily.

Looks like I spoke to soon on this. Using:

     my ($film, $year) = ("The Bravados", 1958);

results in:

PLOT:
 Jim Douglas has been relentlessly pursuing the four outlaws who
murdered his wife, but finds them in jail about to be hanged... more |
add synopsis

so probably a better regular expression would be:

       $plot =~ s/\s+(full summary|more) \| (full|add) synopsis//;




Show quoted text
--
Best regards,
Michael Stepanov,
http://linuxmce.ru
MIME-Version: 1.0
X-Spam-Status: No, hits=-0.0 required=8.0 tests=SPF_HELO_PASS
In-Reply-To: <rt-3.6.HEAD-6514-1257934603-200.51240-6-0@rt.cpan.org>
X-Provags-ID: V01U2FsdGVkX18WuYZ8DQPINR/mH0BZNe9lXnkrpg7h+icSBK8 rDDTALycTiuFLY34P9QTMaMPAIDOpxcSZM++RG/RwBXLKZSfis 8UupX84XRF30KKaxdZgkQ==
References: <RT-Ticket-51240@rt.cpan.org> <rt-3.6.HEAD-9524-1257788370-1522.51240-5-0@rt.cpan.org> <deadd08a0911110216k5ef0207te0fcaa5ce51912b7@mail.gmail.com> <rt-3.6.HEAD-6514-1257934603-200.51240-6-0@rt.cpan.org>
Message-ID: <Pine.LNX.4.63.0911111423580.14876@buttercup.gerph.org>
Content-Type: TEXT/PLAIN; charset="utf-8"; format="flowed"
X-X-Sender: justin@buttercup.gerph.org
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 0861E4D8040 for <bug-IMDB-Film@rt.cpan.org>; Wed, 11 Nov 2009 09:24:46 -0500 (EST)
Received: (qmail 20768 invoked by uid 103); 11 Nov 2009 14:24:45 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 11 Nov 2009 14:24:45 -0000
Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.17.9) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Wed, 11 Nov 2009 06:24:43 -0800
Received: from buttercup.gerph.org (dyn-62-56-57-17.dslaccess.co.uk [62.56.57.17]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MMYL0-1N2Bz70I7a-008TcI; Wed, 11 Nov 2009 15:24:39 +0100
Received: by buttercup.gerph.org (Postfix, from userid 1000) id 3C28A1C5CF8; Wed, 11 Nov 2009 14:24:38 +0000 (GMT)
Received: from localhost (localhost [127.0.0.1]) by buttercup.gerph.org (Postfix) with ESMTP id 0B76020766 for <bug-IMDB-Film@rt.cpan.org>; Wed, 11 Nov 2009 14:24:38 +0000 (GMT)
Delivered-To: cpan-bug+IMDB-Film@diesel.bestpractical.com
Subject: Re: [rt.cpan.org #51240] $film->plot() returning invalid results
Return-Path: <gerph@gerph.org>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-IMDB-Film@rt.cpan.org
Date: Wed, 11 Nov 2009 14:24:37 +0000 (GMT)
X-Spam-Level: *
To: Michael Stepanov via RT <bug-IMDB-Film@rt.cpan.org>
From: Justin Fletcher <gerph@gerph.org>
RT-Message-ID: <rt-3.6.HEAD-6514-1257949496-57.51240-0-0@rt.cpan.org>
Content-Length: 1777
On Wed, 11 Nov 2009, Michael Stepanov via RT wrote:
Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=51240 > > > Hi Justing, > > Thanks for the bugreport. I tested all cases you sent me. The function > retrieved plot will be fixed to avoid retrieving plot keywords instead. But > the issue with displaying "more | add synopsis" is already fixed in 0.42 (at > least I got clear plot without those).
Strange; I definitely saw that and couldn't see how it could be avoided, but if you're not seeing it then it might be something peculiar to my setup. Thanks for having a look at that :-)
Show quoted text
> On Mon, Nov 9, 2009 at 7:39 PM, Justin Fletcher via RT < > bug-IMDB-Film@rt.cpan.org> wrote: >
>> Queue: IMDB-Film >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=51240 > >> >> On Mon Nov 09 12:16:00 2009, gerph wrote:
>>> ... because the full summary and bits appear as links on the end of
>> the
>>> text. If the line in sub plot is changed to: >>> >>> $plot =~ s/\s+full summary \| (full|add) synopsis//; >>> >>> then this appears to strip them quite happily.
>> >> Looks like I spoke to soon on this. Using: >> >> my ($film, $year) = ("The Bravados", 1958); >> >> results in: >> >> PLOT: >> Jim Douglas has been relentlessly pursuing the four outlaws who >> murdered his wife, but finds them in jail about to be hanged... more | >> add synopsis >> >> so probably a better regular expression would be: >> >> $plot =~ s/\s+(full summary|more) \| (full|add) synopsis//; >> >> >>
> >
-- Gerph <http://gerph.org/> [ All information, speculation, opinion or data within, or attached to, this email is private and confidential. Such content may not be disclosed to third parties, or a public forum, without explicit permission being granted. ]


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.