[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-porters
Subject:    Re: [patch] improve B::Concise -src support
From:       "Joshua ben Jore" <twists () gmail ! com>
Date:       2007-09-24 15:38:10
Message-ID: dc5c751d0709240838q2a0c90eboc9085154b87a3d32 () mail ! gmail ! com
[Download RAW message or body]

On 9/23/07, Jim Cromie <jim.cromie@gmail.com> wrote:
> 2 - adds a 1-liner tip showing that concise_stashref exists,
> and how to use it.  Changes for 1 also work here with -src
>
> perl -MB::Concise -e 'B::Concise::compile("-exec","-src",
> \%B::Concise::)->()'

That's neat. What do you think of promoting that to an import option
so O.pm can still be there as normal:

perl -MO=Concise,-exec,-src=B::Concise -e1

> -    open (my $fh, $file)
> -       or warn "# $file: $!, (chdirs not supported by this feature yet)\n"
> +    unless (-f $fullnm) {
> +       ($fullnm) = grep /$file$/, keys %:: ;
> +       $fullnm =~ s/^_<//;

If <_$file exists, shouldn't it be preferred over the file system?
They can be different. Also, my filenames almost always have the '.'
regexp meta character. All the other ones are also allowed. How about
a quotemeta in there?

> +    open (my $fh, $fullnm)

Again, '<' and other things special to open() are allowed in my
filename. This oughta be three-arg or with the piles of "< $fullnm\0"
stuff

> +This renders all functions in the B::Concise package with the source
> +lines.  It eschews the O framework so that the stashref can be passed
> +directly to B::Concise::compile().

Does this matter?

Josh
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic