Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale::Maketext failure_handler_auto problem #7767

Closed
p5pRT opened this issue Jan 26, 2005 · 8 comments
Closed

Locale::Maketext failure_handler_auto problem #7767

p5pRT opened this issue Jan 26, 2005 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 26, 2005

Migrated from rt.perl.org#33938 (status was 'resolved')

Searchable as RT33938$

@p5pRT
Copy link
Author

p5pRT commented Jan 26, 2005

From root@srv03.sparkit.no

Created by maybe@yes.no

This patch fixes a problem with Locale​::Maketext
'failure_handler_auto' method, with regards to
parameter handling. It also fixes cases where _compile()
doesn't return a plain scalar.

Inline Patch
--- Maketext.pm.orig    Tue Aug  3 12:13:02 2004
+++ Maketext.pm Wed Sep 22 18:59:06 2004
@@ -126,7 +126,7 @@
   # Meant to be used like:
   #  $handle->fail_with('failure_handler_auto')

-  my($handle, $phrase, @params) = @_;
+  my($handle, $phrase) = splice(@_,0,2);
   $handle->{'failure_lex'} ||= {};
   my $lex = $handle->{'failure_lex'};

@@ -134,6 +134,9 @@
   $lex->{$phrase} ||= ($value = $handle->_compile($phrase));

   # Dumbly copied from sub maketext:
+  return $$value if ref($value) eq 'SCALAR';
+  return $value unless ref($value) eq 'CODE';
+
   {
     local $SIG{'__DIE__'};
     eval { $value = &$value($handle, @_) };
@@ -173,6 +176,7 @@
   Carp::croak "maketext requires at least one parameter" unless @_ > 1;

   my($handle, $phrase) = splice(@_,0,2);
+Carp::confess("No handle/phrase") unless (defined($handle) && defined($phrase));

   # Look up the value:
Perl Info

Flags:
    category=library
    severity=high

Site configuration information for perl v5.8.5:

Configured by root at Thu Oct 14 18:14:36 CEST 2004.

Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=freebsd, osvers=4.9-prerelease, archname=i386-freebsd
    uname='freebsd srv03.sparkit.no 4.9-prerelease freebsd 4.9-prerelease #3: sun sep 21 20:34:32 cest 2003 root@srv02.sparkit.no:usrsrcsyscompilesparkit-4-8 i386 '
    config_args='-d -e'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include',
    optimize='-O',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='2.95.4 20020320 [FreeBSD]', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.5:
    /usr/local/lib/perl5/5.8.5/i386-freebsd
    /usr/local/lib/perl5/5.8.5
    /usr/local/lib/perl5/site_perl/5.8.5/i386-freebsd
    /usr/local/lib/perl5/site_perl/5.8.5
    /usr/local/lib/perl5/site_perl
    .


Environment for perl v5.8.5:
    HOME=/root
    LANG (unset)
    LANGUAGE (unset)
    LC_CTYPE=no_NO.ISO_8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/usr/local/mysql/bin:/data/apps/apache2/bin:/data/apps/webapp/bin
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2005

From @schwern

Calling Sean Burke. Come in, Sean.

@p5pRT
Copy link
Author

p5pRT commented Jul 8, 2005

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2005

From sburke@cpan.org

Michael G Schwern via RT wrote​:

Calling Sean Burke. Come in, Sean.
URL?
https://rt.cpan.org/Ticket/Display.html?id=33938
Is no-go.

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2005

From sburke@cpan.org

Michael G Schwern via RT wrote​:

Calling Sean Burke. Come in, Sean.
Odd, I can't access https://rt-archive.perl.org/perl5/Ticket/Display.html?id=33938
with my usual username and password.

@p5pRT
Copy link
Author

p5pRT commented Jul 9, 2005

From sburke@cpan.org

Michael G Schwern via RT wrote​:

Calling Sean Burke. Come in, Sean.
Yay, I got in.
Boo for me for having let this bug sit forever. I'll try to fix it in
the next few days.

@p5pRT
Copy link
Author

p5pRT commented May 8, 2007

From @petdance

This is in 1.11_01 of Locale​::Maketext.

@p5pRT
Copy link
Author

p5pRT commented May 8, 2007

@petdance - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant