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

Storable does not store REGEXP items #9222

Closed
p5pRT opened this issue Feb 7, 2008 · 12 comments
Closed

Storable does not store REGEXP items #9222

p5pRT opened this issue Feb 7, 2008 · 12 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 7, 2008

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

Searchable as RT50608$

@p5pRT
Copy link
Author

p5pRT commented Feb 7, 2008

From sand@franz.ak.mind.de

Created by sand@k75.linux.bogus

use Storable; Storable​::dclone qr/foo/;

gives

Can't store REGEXP items at -e line 1.

Perl Info

Flags:
    category=library
    severity=high

Site configuration information for perl 5.11.0:

Configured by sand at Wed Feb  6 18:26:37 CET 2008.

Summary of my perl5 (revision 5 version 11 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.6.22-1-k7, archname=i686-linux
    uname='linux k75 2.6.22-1-k7 #1 smp sun jul 29 15:15:55 utc 2007 i686 gnulinux '
    config_args='-Dprefix=/home/src/perl/repoperls/installed-perls/perl/paRQ0wG/perl-5.10.0@33242 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db'
    hint=recommended, useposix=true, d_sigaction=define
    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 ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.1.2 20061115 (prerelease) (Debian 4.1.1-21)', 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 =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/lib64
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.7.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.7'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib'

Locally applied patches:
    DEVEL
    patchaperlup: --branch='perl' --upto='33242' --start='32643'


@INC for perl 5.11.0:
    /home/src/perl/repoperls/installed-perls/perl/paRQ0wG/perl-5.10.0@33242/lib/5.11.0/i686-linux
    /home/src/perl/repoperls/installed-perls/perl/paRQ0wG/perl-5.10.0@33242/lib/5.11.0
    /home/src/perl/repoperls/installed-perls/perl/paRQ0wG/perl-5.10.0@33242/lib/site_perl/5.11.0/i686-linux
    /home/src/perl/repoperls/installed-perls/perl/paRQ0wG/perl-5.10.0@33242/lib/site_perl/5.11.0
    .


Environment for perl 5.11.0:
    HOME=/home/sand
    LANG=de_DE.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/lib/ccache:/home/sand/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/perl/bin:/usr/X11/bin:/sbin:/usr/sbin
    PERL_BADLANG (unset)
    SHELL=/usr/bin/zsh

@p5pRT
Copy link
Author

p5pRT commented Dec 1, 2011

From @jkeenan

On Wed Feb 06 23​:42​:33 2008, sand@​franz.ak.mind.de wrote​:

use Storable; Storable​::dclone qr/foo/;

gives

Can't store REGEXP items at -e line 1.

This is acknowledged in the documentation for Storable (Perl 5.14.2)​:

###
BUGS
  You can't store GLOB, FORMLINE, REGEXP, etc.... If you can define
semantics for those operations, feel free to enhance Storable so that
it can deal with them.
###

Personally, I don't think an acknowledged limitation of a library
qualifies as a bug -- the POD notwithstanding.

And if it's not a bug, then we should not keep an RT ticket open for
this. Absent a patch or some complaint, I will close this ticket in 7
days time.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Dec 1, 2011

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

@p5pRT
Copy link
Author

p5pRT commented Dec 1, 2011

From @cpansprout

On Wed Nov 30 19​:46​:11 2011, jkeenan wrote​:

On Wed Feb 06 23​:42​:33 2008, sand@​franz.ak.mind.de wrote​:

use Storable; Storable​::dclone qr/foo/;

gives

Can't store REGEXP items at -e line 1.

This is acknowledged in the documentation for Storable (Perl 5.14.2)​:

###
BUGS
You can't store GLOB, FORMLINE, REGEXP, etc.... If you can define
semantics for those operations, feel free to enhance Storable so that
it can deal with them.
###

Personally, I don't think an acknowledged limitation of a library
qualifies as a bug -- the POD notwithstanding.

And if it's not a bug, then we should not keep an RT ticket open for
this.

I find it helpful to have it open as a reminder. RT is my to-do list. :-)

Absent a patch or some complaint, I will close this ticket in 7
days time.

Thank you very much.
Jim Keenan

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Dec 1, 2011

From @nwc10

[aside - thanks for your ongoing work in cleaning out the RT queue]

On Wed, Nov 30, 2011 at 07​:46​:12PM -0800, James E Keenan via RT wrote​:

This is acknowledged in the documentation for Storable (Perl 5.14.2)​:

###
BUGS
You can't store GLOB, FORMLINE, REGEXP, etc.... If you can define
semantics for those operations, feel free to enhance Storable so that
it can deal with them.
###

Personally, I don't think an acknowledged limitation of a library
qualifies as a bug -- the POD notwithstanding.

Personally, I do.

It's marked as a limitation that is not desired, and should be eliminated.
That's not the same as a limitation that's going to stay.

And if it's not a bug, then we should not keep an RT ticket open for
this. Absent a patch or some complaint, I will close this ticket in 7
days time.

It's an unresolved bug that Storable can't store regular expressions.
We track open bugs in RT.

By that measure the ticket *should* remain open, even if there has been
no progress on fixing it for some years. To close it would be lying to
ourselves. The goal isn't minimise open RT tickets, it's minimise bugs.

Nicholas Clark

@p5pRT
Copy link
Author

p5pRT commented Dec 1, 2011

From @demerphq

On 1 December 2011 04​:46, James E Keenan via RT
<perlbug-followup@​perl.org> wrote​:

On Wed Feb 06 23​:42​:33 2008, sand@​franz.ak.mind.de wrote​:

use Storable; Storable​::dclone qr/foo/;

gives

Can't store REGEXP items at -e line 1.

This is acknowledged in the documentation for Storable (Perl 5.14.2)​:

###
BUGS
 You can't store GLOB, FORMLINE, REGEXP, etc.... If you can define
semantics for those operations, feel free to enhance Storable so that
it can deal with them.

I find this an interesting message. FORMLINE I mostly understand, GLOB
is a little less understandably but sill in the "well I can see the
point.." category, but REGEXP I actually dont get at all.

The only circumstance that a REGEXP object would not make sense in
Storable is when it is bound to a non Perl regex engine.

Other than that, it seems to me that the semantics are clear​: do the
same thing that Data​::Dump​::Streamer does, and do the Storable
equivalent of

  qr/$pattern/$modifiers

$ perl -MData​::Dump​::Streamer -e'Dump { foo => qr/bar/i }'
$HASH1 = { foo => qr/bar/i };

Although I will say that while I think the semantics are clear for
REGEXP objects, the implementation in Storable is not to me.

cheers,
Yves

--
perl -Mre=debug -e "/just|another|perl|hacker/"

@p5pRT
Copy link
Author

p5pRT commented Jul 17, 2016

@dcollinsn - Status changed from 'open' to 'stalled'

@p5pRT
Copy link
Author

p5pRT commented Apr 4, 2018

From @eserte

Dana Wed, 06 Feb 2008 23​:42​:33 -0800, sand@​franz.ak.mind.de reče​:

This is a bug report for perl from sand@​k75.linux.bogus,
generated with the help of perlbug 1.36 running under perl 5.11.0.

-----------------------------------------------------------------
[Please enter your report here]
use Storable; Storable​::dclone qr/foo/;

gives

Can't store REGEXP items at -e line 1.

[Please do not change anything below this line]
-----------------------------------------------------------------

It was not really advertized, but starting with Storable 3.06 which is part of perl 5.27.9 and later there's experimental regexp support built in. The above code line does not fail anymore, and seems to do the right thing​:

  $ perl5.27.10 -e 'use Storable; use Data​::Dumper; warn Dumper Storable​::dclone qr/foo/;'
  $VAR1 = qr/foo/;

Now it would be nice if there was a CPAN release of this Storable version, so older perls can also use the new feature.

@p5pRT
Copy link
Author

p5pRT commented Apr 4, 2018

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

@p5pRT
Copy link
Author

p5pRT commented Apr 5, 2018

From @xsawyerx

On 04/04/2018 12​:07 PM, slaven@​rezic.de via RT wrote​:

Dana Wed, 06 Feb 2008 23​:42​:33 -0800, sand@​franz.ak.mind.de reče​:

This is a bug report for perl from sand@​k75.linux.bogus,
generated with the help of perlbug 1.36 running under perl 5.11.0.

-----------------------------------------------------------------
[Please enter your report here]
use Storable; Storable​::dclone qr/foo/;

gives

Can't store REGEXP items at -e line 1.

[Please do not change anything below this line]
-----------------------------------------------------------------
It was not really advertized, but starting with Storable 3.06 which is part of perl 5.27.9 and later there's experimental regexp support built in. The above code line does not fail anymore, and seems to do the right thing​:

$ perl5\.27\.10 \-e 'use Storable; use Data&#8203;::Dumper; warn Dumper Storable&#8203;::dclone qr/foo/;'
$VAR1 = qr/foo/;

Now it would be nice if there was a CPAN release of this Storable version, so older perls can also use the new feature.

Last CPAN release was 2014 - a long time ago. I'll work on that. Thanks
for the ping, Slaven. :)

@p5pRT
Copy link
Author

p5pRT commented Aug 6, 2019

From @tonycoz

On Thu, 05 Apr 2018 01​:10​:45 -0700, xsawyerx@​gmail.com wrote​:

On 04/04/2018 12​:07 PM, slaven@​rezic.de via RT wrote​:

Dana Wed, 06 Feb 2008 23​:42​:33 -0800, sand@​franz.ak.mind.de reče​:

This is a bug report for perl from sand@​k75.linux.bogus,
generated with the help of perlbug 1.36 running under perl 5.11.0.

-----------------------------------------------------------------
[Please enter your report here]
use Storable; Storable​::dclone qr/foo/;

gives

Can't store REGEXP items at -e line 1.

[Please do not change anything below this line]
-----------------------------------------------------------------
It was not really advertized, but starting with Storable 3.06 which
is part of perl 5.27.9 and later there's experimental regexp support
built in. The above code line does not fail anymore, and seems to do
the right thing​:

$ perl5.27.10 -e 'use Storable; use Data​::Dumper; warn Dumper
Storable​::dclone qr/foo/;'
$VAR1 = qr/foo/;

Now it would be nice if there was a CPAN release of this Storable
version, so older perls can also use the new feature.

Last CPAN release was 2014 - a long time ago. I'll work on that.
Thanks
for the ping, Slaven. :)

This was released to CPAN in Storable 3.08.

Closing.

Tony

@p5pRT
Copy link
Author

p5pRT commented Aug 6, 2019

@tonycoz - 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