[26098] in Perl-Users-Digest
Perl-Users Digest, Issue: 8297 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 1 11:05:37 2005
Date: Mon, 1 Aug 2005 08:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 1 Aug 2005 Volume: 10 Number: 8297
Today's topics:
Active Perl: XP dll corrupted? <gbeccles@a-znet.com>
Re: Active Perl: XP dll corrupted? <mothra@nowhereatall.com>
ANNOUNCE: DBIx::Admin::BackupRestore V 1.08 <ron@savage.net.au>
ANNOUNCE: Image::Magick::Chart V 1.02 <ron@savage.net.au>
ANNOUNCE: Text::QuickTemplate v0.02 <sdn.patent00459@zoemail.net>
Re: Coding Conventions and Speech: No Punctuation, Rena <vtatila@mail.student.oulu.fi>
Re: Coding Conventions and Speech: No Punctuation, Rena (Anno Siegel)
desc $table in DBI Oracle <ngoc@yahoo.com>
regex help <i.gave.up.my.privacy@gmail.com>
Re: regex help <regner@dievision.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 01 Aug 2005 09:59:42 -0400
From: George <gbeccles@a-znet.com>
Subject: Active Perl: XP dll corrupted?
Message-Id: <j9ase1l0fa9o9if4l5epenmgtgq7dpraf2@4ax.com>
Running XP SP2. I installed ActivePerl 5.8.7.813 (MSWin32) last week.
Now, when I try to run certain other apps (nbtstat, acrobat), I get an
error message:
"The procedure entry point [whatever] could not be located
in the dll ADVAPI32.dll"
I don't get any hits when I google for this. So, it could be
something else, but I thought I should ask if anyone has any clues
about this.
TIA,
George
------------------------------
Date: Mon, 1 Aug 2005 07:39:58 -0700
From: "Mothra" <mothra@nowhereatall.com>
Subject: Re: Active Perl: XP dll corrupted?
Message-Id: <42ee3a99$1@usenet.ugs.com>
George wrote:
> "The procedure entry point [whatever] could not be located
> in the dll ADVAPI32.dll"
>
(snipped)
http://www.auditmypc.com/process/advapi32.asp
Your problem has absolutely nothing to do with Perl
Mothra
------------------------------
Date: Sun, 24 Jul 2005 01:13:30 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: DBIx::Admin::BackupRestore V 1.08
Message-Id: <IKJsKA.nqo@zorch.sf-bay.org>
The pure Perl module DBIx::Admin::BackupRestore V 1.08
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
1.08 Tue Jul 19 10:45:00 2005
- The previous patches did not include sub backup() calling sub process_table()
to split the schema name off from the table name, so table names with schema
names still attached were not being skipped. Big mistake. My aplologies
- Add XML::Parser, XML::Records and XML::TokeParser to Build.PL and
Makefile.PL.
They should have been included since V 1.06
Special thanks to Jonathan Leffler for pointing out the omissions in the
requirements.
------------------------------
Date: Sun, 24 Jul 2005 01:12:21 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: Image::Magick::Chart V 1.02
Message-Id: <IKJsKI.yBE@zorch.sf-bay.org>
The pure Perl module Image::Magick::Chart V 1.02
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.
On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.
An extract from the docs:
1.02 Sun Jul 17 17:52:00 2005
- Add an option, y_axis_labels_x, which allows the user to specify the x-axis
value
(abscissa) at which to start writing y-axis labels. From the POD:
The value, if not undef, determines the x-axis value (abscissa) at which
y-axis labels are written.
The special value undef means this module calculates an abscissa at which to
start writing
y-axis labels. The default behaviour is identical to the previous version
1.01.
This calculation will only produce a pretty-looking column of y-axis labels
when all labels are
the same width in pixels. See C<sub draw_y_axis_labels()> for the calculation.
The default value is undef.
This parameter is optional.
------------------------------
Date: Mon, 25 Jul 2005 01:57:56 GMT
From: "Eric J. Roode" <sdn.patent00459@zoemail.net>
Subject: ANNOUNCE: Text::QuickTemplate v0.02
Message-Id: <IKJsK0.yAH@zorch.sf-bay.org>
A new Perl module, Text::QuickTemplate, is now available at
a CPAN near you.
I can hear people groaning already, "Another templating module??"
Yes, CPAN has many, many templating modules -- nearly all of which
are far more powerful than Text::QuickTemplate. Virtually none of
them are lightweight and simple. That's why I truly believe that
there's a niche for this module.
Text::QuickTemplate does not require you to buy into any fancy
syntax or filesystem layout. It doesn't support anything that
complex, and never will. All it does is allow you to create simple
fill-in templates, and ... fill them in.
Here's an example, from the README:
$template = Text::QuickTemplate->new(<<END_TEMPLATE);
Dear {{to}},
Have a {{day_type}} day.
Your {{relation}},
{{from}}
END_TEMPLATE
$letter1 = $template->fill (
{to => 'Professor Dumbledore',
relation => 'friend',
day_type => 'swell',
from => 'Harry',
});
$letter2 = $template->fill (
{to => 'Lord Voldemort',
relation => 'sworn enemy',
day_type => 'rotten',
from => 'Harry',
});
Text::QuickTemplate is pure perl, and requires the following CPAN
modules: Readonly, and Exception::Class.
--
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
------------------------------
Date: Mon, 1 Aug 2005 15:01:20 +0300
From: "Veli-Pekka Tätilä" <vtatila@mail.student.oulu.fi>
Subject: Re: Coding Conventions and Speech: No Punctuation, Renaming Operators etc...
Message-Id: <dcl2un$sct$1@news.oulu.fi>
Anno Siegel wrote:
> More generally, filtering a Perl source before it is spoken could help
> making it more understandable without changing the code itself.
Yes, one problem with a conventional source filter is that once the source
is filtered I reckon there's no easy way to see the filtered end-result, is
there? Again doesn't matter much just yet but I suppose most sighted folks
would prefer to read the ordinary source code, which is valid Perl without
processing.
> If the code could be analyzed to the level a typical syntax highlighter
> does in an editor (not perfect, but usually close), you'd know what are
> keywords and what are variables, where blocks begin and end
That's true though my current editor, NoteTab Pro, does not support Perl
syntax highlighting. Of course the highlight info would need to be
represented textually. COlors just make the text harder to read by lowering
the contrast and my sight is not good enough for quickly distinguishing
between a number of colors.
And with screen reader prompts, you might well get something like:
color blue $variable color green equals color red 7 to give an imaginary
example. That is hardly neither compact nor very informative. Should I deal
with pre-defined color names in the code, things will be even messier.
That's why, you guessed it, I don't let the screen reader prompt foreground
color changes and try to generally disable syntax highlighting when-ever
easily possible.
> would certainly not be done in a day or two.
Yep and I would probably need to move on using some Unix editor like VI or
Emacs. I've got nothing against them as such but the accessibility of most
console programs using a Windows screen reader is not terribly good compared
to native Win32 controls.
Still an interesting tac of solving the problem. Thought provoking stuff.
--
With kind regards Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/
------------------------------
Date: 1 Aug 2005 12:57:01 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Coding Conventions and Speech: No Punctuation, Renaming Operators etc...
Message-Id: <dcl66t$p7h$1@mamenchi.zrz.TU-Berlin.DE>
Veli-Pekka Tätilä <vtatila@mail.student.oulu.fi> wrote in comp.lang.perl.misc:
> Anno Siegel wrote:
> > More generally, filtering a Perl source before it is spoken could help
> > making it more understandable without changing the code itself.
> Yes, one problem with a conventional source filter is that once the source
> is filtered I reckon there's no easy way to see the filtered end-result, is
> there?
I'm not particularly acquainted with the filter modules, but I'm sure
there is.
> Again doesn't matter much just yet but I suppose most sighted folks
> would prefer to read the ordinary source code, which is valid Perl without
> processing.
That's one problem I see with the source filter approach. It would be
preferable to leave the source code alone as much as possible and add
reading aids only as it goes to the screen reader.
> > If the code could be analyzed to the level a typical syntax highlighter
> > does in an editor (not perfect, but usually close), you'd know what are
> > keywords and what are variables, where blocks begin and end
> That's true though my current editor, NoteTab Pro, does not support Perl
> syntax highlighting. Of course the highlight info would need to be
> represented textually. COlors just make the text harder to read by lowering
> the contrast and my sight is not good enough for quickly distinguishing
> between a number of colors.
Oh, I didn't mean to use syntax highlighting as it comes. It's a
pain on the eyes even for people with normal eyesight -- I usually
switch it off if I don't have time to tune it.
> And with screen reader prompts, you might well get something like:
> color blue $variable color green equals color red 7 to give an imaginary
> example. That is hardly neither compact nor very informative. Should I deal
> with pre-defined color names in the code, things will be even messier.
Sure, that would be no help at all.
What I mean is, use the info a typical syntax analyzer has to change
symbols to meaningful strings. If you know that a certain "{" begins
a new block, you could render it as "begin block", or even "begin block
level N". "$", "@" and "%" could be translated to "scalar", "array" and
"hash" if they come before a variable, but to "dollar", "at-sign" and
"percent" in comments and strings. That kind of thing.
I suppose, only a fraction of what a syntax analyzer "knows" can
be usefully rendered in speech. Wise limitation would be the key.
> That's why, you guessed it, I don't let the screen reader prompt foreground
> color changes and try to generally disable syntax highlighting when-ever
> easily possible.
Sure, the visual aids a syntax highlighter produces are no help for the
blind, and reading them aloud would presumably make things worse. One
would have to find ways of producing textual aids that work in an auditory
environment. Even with the syntax analysis out of the way that would have
to be a sophisticated program.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
Date: Mon, 01 Aug 2005 12:27:05 +0200
From: ngoc <ngoc@yahoo.com>
Subject: desc $table in DBI Oracle
Message-Id: <42edf8f5$1@news.broadpark.no>
Hi
I use "my $header_sql = qq { desc $table };". It does not work.
But "select column_name from all_tab_columns where table_name =
\'$table\'" work.
My problem is "desc $table" matching which "select * from $table"
than
select column_name ...........
(I mean data and column name order matching).
Thanks
------------------------------
Date: Mon, 01 Aug 2005 10:21:32 GMT
From: Derf <i.gave.up.my.privacy@gmail.com>
Subject: regex help
Message-Id: <Xns96A5356238D29igaveupmyprivacygmai@24.93.43.121>
I am new to Perl. I am grabbing all the directories (within a specified
directory) and listing them out with their contents (files). I create a
hash that just has a 1 as the value for now.
I do not fully understand the regex I am using and I am looking for
clarification on what it does.
------------
foreach $file (keys %files){
print qq~ $file | $files{$file} ~;
}
prints:
d://work (2001)/work 2001.txt | 1
d://work (2001)/more work.txt | 1
d://extrafiles/examples.txt | 1
d://extrafiles/more examples.txt | 1
------------
I keep a separate list of the directories in %dirs (since I grabbed them
first before adding the full file paths):
foreach $directory (keys %dirs){
print qq~ $directory | $dirs{$directory} ~;
}
prints:
d://work (2001) | 1
d://extrafiles | 1
------------
So I found a regex (that I didn't write) that seems to work well
stripping the filenames from within the directory
my @items = sort {$a cmp $b} keys %dirs;
for(my $a = 0; $a <= $#items; $a++) {
my @get_files = grep { /^$items[$a]\/([^\/])+$/ } keys %files;
}
and this works great except for the directory that ends with a close
parenthesis. @get_files contains all the files within d://extrafiles
(examples.txt and more examples.txt) but doesn't see the files within
d://work (2001)
My question revolves around the regex and using it with grep. What
exactly is happening with ([^\/])+ and is there any obvious reason why it
doesn't like the close parenthesis directory name
I actually tried this with a bunch of directories and it didn't see
inside any directory with a close parenthesis as the last character of
the name.
I am using Activestate Perl 5.83 on a Windows 2003 server.
I am really more interested in this point what is happening in the regex
that makes this anomaly (and is there a way to resolve it while still
using the grep structure I have since in the future I might want to use
deeper directory trees).
I hope I am making sense. I have been teaching myself and I am still a
little foggy on grep and regex.
Thanks for any help
Derf
------------------------------
Date: Mon, 01 Aug 2005 12:40:53 +0200
From: Tom Regner <regner@dievision.de>
Subject: Re: regex help
Message-Id: <42edfc2e$0$15214$4d3ebbfe@news1.pop-hannover.net>
Derf wrote:
[...]
> So I found a regex (that I didn't write) that seems to work well
> stripping the filenames from within the directory
>
> my @items = sort {$a cmp $b} keys %dirs;
> for(my $a = 0; $a <= $#items; $a++) {
> my @get_files = grep { /^$items[$a]\/([^\/])+$/ } keys %files;
> }
> and this works great except for the directory that ends with a close
> parenthesis. @get_files contains all the files within d://extrafiles
> (examples.txt and more examples.txt) but doesn't see the files within
> d://work (2001)
[...]
The parens in the filename are read as grouping parens, encapsulate the
interpolation with \Q...\E, disabling meta-character-interpretation for the
interpolated part of the regex:
my @items = sort {$a cmp $b} keys %dirs;
for(my $a = 0; $a <= $#items; $a++) {
my @get_files = grep { /^\Q$items[$a]\E\/([^\/])+$/ } keys %files;
}
this should do the trick, for more information, read perldoc perlre.
regards,
Tom Regner
--
Dievision GmbH | Kriegerstrasse 44 | 30161 Hannover
Telefon: (0511) 288791-0 | Telefax: (0511) 288791-99
http://www.dievision.de
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8297
***************************************