[RFC] File::TVShow::Parse

--0000000000004470c105841a0876
Content-Type: text/plain; charset="UTF-8"

Hello Everyone,

I am considering a module to supplement Video::Filename written by
Behan Webster. I have tried reaching out to him in the past couple of
weeks. Submitting a patch to provide support for show
name.yyyy.mm.dd.ext


In the mean time I have been considering if a specific module for TV
Shows only might also be worth while, of course with additional
features and support.

See attached podtotext file.

I have a few questions.

1)
Would it be better to go with Parse, Meta, or Info since we are
attempting to get meta data from from the file naming. There is
already a Video::Info which does the deep dive into the file contents
from what I have read. I have not used the module itself.

2)
Should I keep support for perl below version 5.10 as versions below
this do not support named groups in regex. I have seen on PerlMonks
that there are still questions being asked by people using perl
versions less than 5.10


Looking forward to hearing back.

Best,
Adam Spann

--0000000000004470c105841a0876
Content-Type: text/plain; charset="US-ASCII"; name="Parse.txt"
Content-Disposition: attachment; filename="Parse.txt"
Content-Transfer-Encoding: base64
Content-ID: <f_jt9j59nx0>
X-Attachment-Id: f_jt9j59nx0

TkFNRQogICAgRmlsZTo6VFZTaG93OjpQYXJzZQoKVkVSU0lPTgogICAgVmVyc2lvbiAwLjAxCgpT
WU5PUFNJUwogICAgVGhpcyBtb2R1bGUgaXMgaW50ZW5kZWQgdG8gcGFyc2UgYW5kIGlkZW50aWZ5
IGluZm9ybWF0aW9uIGluIHRoZSBmaWxlCiAgICBuYW1lIG9mIGEgVFYgc2hvdy4gVGhlc2UgZGV0
YWlscyBjYW4gdGhlbiBiZSBhY2Nlc3NlZCBieSBjYWxsaW5nIHRoZQogICAgcmVsZXZhbnQgbWV0
aG9kcy4gSXQgZG9lcyBOT1QgYXR0ZW1wdCB0byByZWFkIHRoZSBjb250ZW50cyBvZiB0aGUgZmls
ZS4KCiAgICBOb3RlOiBUaGlzIG1vZHVsZSB3aWxsIG1vZGVsbGVkIG9mZiBWaWRlbzo6RmlsZW5h
bWUgY3JlYXRlZCBieSBCZWhhbgogICAgV2Vic3RlciwgYnV0IHdpbGwgZm9jdXMgb24gVFYgU2hv
d3Mgb25seSBhb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GljZW5zZS4KCiAgICBTZWUgPGh0dHA6Ly9kZXYucGVybC5vcmcv
bGljZW5zZXMvPiBmb3IgbW9yZSBpbmZvcm1hdGlvbi4KCg==
--0000000000004470c105841a0876--
0
baspann
3/15/2019 3:56:55 AM
perl.module-authors 1581 articles. 0 followers. Follow

1 Replies
3 Views

Similar Articles

[PageSpeed] 10

I would tend toward Info myself. The existence of Video::Info is
irrelevant except for highlighting that Info is a valid choice. But I also
admit that's just me, and I tend to view Parse in a language context.

Don't bother trying to support Perl versions less that 5.10. Last I
checked the (admittedly unscientific) surveys, 5.10 was the lowest version
that had a sizeable usage percentage, and on a personal level, I just
don't want to support Perls with flawed security.

My current modules either have a minimum required versions of 5.10.1, or
5.16.1, depending on whether I might have to deal with Unicode. I've never
had a complaint (I don't write pragmas or system-oriented code, so it's
never been anything I've need to worry about).

     -john

On Thu, March 14, 2019 10:56 pm, Adam Spann wrote:
> Hello Everyone,
>
> I am considering a module to supplement Video::Filename written by
> Behan Webster. I have tried reaching out to him in the past couple of
> weeks. Submitting a patch to provide support for show
> name.yyyy.mm.dd.ext
>
>
> In the mean time I have been considering if a specific module for TV
> Shows only might also be worth while, of course with additional
> features and support.
>
> See attached podtotext file.
>
> I have a few questions.
>
> 1)
> Would it be better to go with Parse, Meta, or Info since we are
> attempting to get meta data from from the file naming. There is
> already a Video::Info which does the deep dive into the file contents
> from what I have read. I have not used the module itself.
>
> 2)
> Should I keep support for perl below version 5.10 as versions below
> this do not support named groups in regex. I have seen on PerlMonks
> that there are still questions being asked by people using perl
> versions less than 5.10
>
>
> Looking forward to hearing back.
>
> Best,
> Adam Spann
>
0
jgamble
3/16/2019 7:09:05 PM
Reply: