From: Alexey Tourbin <at@altlinux.ru> To: ALT Devel discussion list <devel@lists.altlinux.org> Subject: Re: [devel] [git update] packages/file: tags/4.19-alt2 Date: Wed, 28 Feb 2007 20:26:35 +0300 Message-ID: <20070228172635.GJ32320@localhost.localdomain> (raw) In-Reply-To: <20070228163837.GI32320@localhost.localdomain> [-- Attachment #1: Type: text/plain, Size: 2116 bytes --] On Wed, Feb 28, 2007 at 07:38:37PM +0300, Alexey Tourbin wrote: > On Wed, Feb 28, 2007 at 06:55:27PM +0300, Alexey Tourbin wrote: > > > По какому правилу он определился как Perl5 module source text? > > > > $ egrep '^package[ \t]+[A-Za-z][^.;]*;' /usr/lib/perl5/pod/perlfunc.pod > > package in more than one place; it merely influences which symbol table > > $ > > > > Хе-хе, лажа какая. Сейчас исправлю. > > Там размер регулярного выражения ограничен 32 байтами. То есть я > нормальное регвыражение написал, но скомпилировать magic теперь не > получается. А если увеличить место под строку регулярного выражения, > то он опять не компилируется, потому что там фиксированное место под > дисковую структуру. > > 32 байта под регулярное выражение для определения типа файла -- это они > дураки или придуряются? Эврика!! 0 regex ^package[[:space:]]+ 1 >0 regex ^[A-Za-z_][A-Za-z0-9_]* 2 >>0 regex ^(::[A-Za-z_][A-Za-z0-9_]*)* 3 >>>0 regex ^[[:space:]]*; YES $ file -m file/magic/Magdir/perl /usr/lib/perl5/strict.pm /usr/lib/perl5/strict.pm: 1 2 3 YES $ > commit 397f39398ea30bead80d46bb8ccdcb69f34c5b71 > Author: Alexey Tourbin <at@altlinux> > Date: Wed Feb 28 19:14:33 2007 +0300 > > magic/Magdir/perl: use rigorous regular expression for Perl5 modules > > diff --git a/file/magic/Magdir/perl b/file/magic/Magdir/perl > index 2e989d7..1244b10 100644 > --- a/file/magic/Magdir/perl > +++ b/file/magic/Magdir/perl > @@ -14,7 +14,7 @@ > 0 string eval\ '(exit\ $?0)'\ &&\ eval\ 'exec perl script text > > # a couple more, by ldv > -0 regex \^package[\ \ ]+[A-Za-z][^.;]*; Perl5 module source text > +0 regex \^package[[:space:]]+[A-Za-z_][A-Za-z0-9_]*(::[A-Za-z_][A-Za-z0-9_]*)*[[:space:]]*; Perl5 module source text > > # Perl POD documents > # From: Tom Hukins <tom@eborcom.com> > _______________________________________________ > Devel mailing list > Devel@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/devel [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-02-28 17:26 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-02-28 7:26 ` Alexey Tourbin 2007-02-28 13:09 ` Dmitry V. Levin 2007-02-28 15:46 ` Alexey Tourbin 2007-02-28 15:55 ` Alexey Tourbin 2007-02-28 16:38 ` Alexey Tourbin 2007-02-28 17:26 ` Alexey Tourbin [this message] 2007-02-28 18:24 ` Alexey Tourbin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20070228172635.GJ32320@localhost.localdomain \ --to=at@altlinux.ru \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git