Skip Menu |

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

Report information
The Basics
Id: 111088
Status: new
Priority: 0/
Queue: IMDB-Film

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

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



Subject: [PATCH] Fix year()
This simple patch fixes the year() function.
Subject: IMDB-Film_fix_year.patch
--- Film.pm.orig 2013-01-02 10:28:08.000000000 -0700 +++ Film.pm 2016-01-11 10:23:44.237673868 -0700 @@ -378,13 +378,17 @@ unless($self->{_title}) { ($self->{_title}, $self->{_kind}, $self->{_year}) = $title =~ m!(.*?)\s+\((.*?)?\s?([0-9\-]*\s?)\)!; } + + # Another whack at the year. + $self->{_year} = $1 if(!$self->{_year} && $title =~ /\((\d{4})\)/); + $self->{_kind} = 'Movie' unless $self->{_kind}; # Default kind should be movie - # "The Series" An Episode (2005) + # "The Series" An Episode (2005) # "The Series" (2005) - if( $self->{_title} =~ /\"[^\"]+\"(\s+.+\s+)?/ ) { - $self->{_kind} = $1 ? 'E' : 'S'; - } + if( $self->{_title} =~ /\"[^\"]+\"(\s+.+\s+)?/ ) { + $self->{_kind} = $1 ? 'E' : 'S'; + } } }