Skip Menu |

This queue is for tickets about the DateLocale CPAN distribution.

Report information
The Basics
Id: 106736
Status: resolved
Worked: 5 min
Priority: 0/
Queue: DateLocale

People
Owner: NIKOLAS [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Invalid regexp syntax used in egrep call
Makefile.PL has this line: my @locales = `locale -a | egrep -i 'UTF\-?8' | egrep '^(?:$loc)'`; The pattern of the 2nd egrep call looks wrong, (?:...) is a perl extension and not available in standard grep. Probably you have to remove the "?:" bit.
On 2015-08-29 00:46:07, SREZIC wrote: Show quoted text
> Makefile.PL has this line: > > my @locales = `locale -a | egrep -i 'UTF\-?8' | egrep '^(?:$loc)'`; > > The pattern of the 2nd egrep call looks wrong, (?:...) is a perl > extension and not available in standard grep. Probably you have to > remove the "?:" bit.
There should be a programmatic way of getting the list of locales (via something like POSIX or Locale::*), without having to grep the filesystem.
On 2015-08-31 17:09:31, ETHER wrote: Show quoted text
> On 2015-08-29 00:46:07, SREZIC wrote:
> > Makefile.PL has this line: > > > > my @locales = `locale -a | egrep -i 'UTF\-?8' | egrep '^(?:$loc)'`; > > > > The pattern of the 2nd egrep call looks wrong, (?:...) is a perl > > extension and not available in standard grep. Probably you have to > > remove the "?:" bit.
> > > There should be a programmatic way of getting the list of locales (via > something like POSIX or Locale::*), without having to grep the > filesystem.
Looking at FreeBSD's implementation of "locale -a" (see https://github.com/freebsd/freebsd/blob/master/usr.bin/locale/locale.c#L388 ) it does not seem that there's a OS library function for this task. And a quick scan over perl core Locale:: modules does not reveal a candidate having this functionality.