How to restrict who may read my blog?
Perl web-programming
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Perl web-programmingGo to page: « previous | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | next »

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:
Thursday, 9 October 2008
globs and trees in Perl6 Timothy S. Nelson 16:51:04
 Hi all. I've enjoyed(?) reading over the February/March thread
entitled "Musings on operator overloading". I've brought a few thoughts
along; if they're old news, please tell me where to do more reading on it :)­.

Over the last year or two, I've discovered XPath. I've always thought
XML a little annoying, but I'm very impressed with XPath (which I regard as
"the glob() of XML"), and I've been wondering how to get the power of XPath in
relation to *all* data, not just XML.

My eventual thought was that what would be useful is a role called
Plex (for those who aren't familiar with a Plex, just think "Tree" and you'll
have the right idea). The basic idea is that the Plex role could have a
variety of implementors depending on the data desired (much like the DBI/DBD
split, but for trees instead of tables). The backends could of course include
filesystems, but also XML, LDAP, OO databases, and DNS domains.

Tabular data could also be mapped into trees if desired. This could
be anything from SQL to text files.

As an additional idea, backend conversion could be performed. This
would be especially useful in the case of files. For example:

$root/etc/fstab <convert to text table> / "/boot"

...which would select the row from fstab that contains the "/boot"
partition; admittedly I've fudged the conversion here.

As you can see from my example, my idea is also that then there could
be Plex operators which would select out the data desired. In the example
above, it would be necessary for / to be a combination of a flow operator and
a variadic function that takes string and codeblock parameters; it returns a
list of values which are all Plex::Node.



Btw, it was quite a long time before I was able to find the operator
overloading documentation; "Subroutines" was not an intuitive place to look
:)­. Is there any chance we could add something to S03 that says something
like "see S06 and S13 for operator overloading"?

:)­

-------------------­--------------------­--------------------­----------
| Name: Tim Nelson | Because the Creator is, |
| E-mail: wayland@wayland.id.­au | I am |
-------------------­--------------------­--------------------­----------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V-
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

comment 11 answers | Add comment
getting error when add column to table Mmccaws2 04:20:19
 Hi

I don't understand the error for this statement for SQLITE

$dbh->do("ALTER TABLE new_definition (
ADD COLUMN loopback TEXT)");

here is the error message:

DBD::SQLite::db do failed: near "(": syntax error(1) at dbdimp.c line
271 at ./a
ddnewdef.pl line 38.
DBD::SQLite::db do failed: near "(": syntax error(1) at dbdimp.c line
271 at ./a
ddnewdef.pl line 38.

Or is it the case I'll have to delete the table and create the table
with the new column added.




Also additional question about SQLITE. I've been developing using
against a SQLITE db. I trimmed hundreds of entries out of table and
the count command returns values shows that the number of entries has
reduced. However the file doesn't reduce in size. Does SQLITE keep
the last greatest file size eventhough the table has been trimmed?
Or is there something else I need to do.

Thanks

Mike


comment 2 answer | Add comment
Wednesday, 8 October 2008
[svn:perl6-synopsis]­ r14590 - doc/trunk/design/sy­n Guest 22:26:15
 Author: larry
Date: Wed Oct 8 12:06:24 2008
New Revision: 14590

Modified:
doc/trunk/design/sy­n/S13.pod

Log:
wrong year, ruoso++


Modified: doc/trunk/design/sy­n/S13.pod
===================­====================­====================­===================
--- doc/trunk/design/sy­n/S13.pod (original)
+++ doc/trunk/design/sy­n/S13.pod Wed Oct 8 12:06:24 2008
@@ -12,7 +12,7 @@

Maintainer: Larry Wall <larry@wall.org>
Date: 2 Nov 2004
- Last Modified: 8 Oct 2007
+ Last Modified: 8 Oct 2008
Number: 13
Version: 11

Add comment
Problem with column_info/DBD::Or­acle 1.21 Alfred Mickautsch 15:07:21
 Hello,

with ActivePerl 5.10.0 build 1004, DBI 1.607, DBD::Oracle 1.21 and Oracle 10.2.0.1.0 in a PAR-archived executable on a Win XP machine I get the following error message:

DBD::Oracle::db column_info failed: ORA-01008: not all variables bound (DBD ERROR: OCIStmtExecute) [for Statement "SELECT * ...

A trace file (level 15, some lines skipped) is attached.

I am stuck, because on our machines everything works just fine with Oracle clients 8.2, 9.2 and 10.2. Can somebody help me or point to some useful information?

Thankyou

Alfred



--
Alfred Mickautsch

SCHULER Business Solutions AG
Karl-Berner-Str. 4
72285 Pfalzgrafenweiler
Deutschland
Tel: +49 7445 830-184
Fax: +49 7445 830-349
E-Mail: alfred.mickautsch@s­chuler-ag.com
Web: www.schuler-ag.com

SCHULER Business Solutions AG
Aktiengesellschaft mit Sitz in D-72285 Pfalzgrafenweiler, Karl-Berner-Str. 4
Registergericht Stuttgart HRB 430947
Vorstand: Uwe Jonas, Harald Sieber
Vorsitzender des Aufsichtsrates: Achim Gauъ

comment 1 answer | Add comment
Tuesday, 7 October 2008
[svn:perl6-synopsis]­ r14586 - doc/trunk/design/sy­n Guest 20:04:54
 Author: larry
Date: Sun Oct 5 17:05:41 2008
New Revision: 14586

Modified:
doc/trunk/design/sy­n/S03.pod

Log:
Add missing series operator, mostly for readability.


Modified: doc/trunk/design/sy­n/S03.pod
===================­====================­====================­===================
--- doc/trunk/design/sy­n/S03.pod (original)
+++ doc/trunk/design/sy­n/S03.pod Sun Oct 5 17:05:41 2008
@@ -12,9 +12,9 @@

Maintainer: Larry Wall <larry@wall.org>
Date: 8 Mar 2004
- Last Modified: 1 Oct 2008
+ Last Modified: 5 Oct 2008
Number: 3
- Version: 140
+ Version: 141

=head1 Overview

@@ -49,7 +49,7 @@
R Item assignment = := ::= => += -= **= xx= .=
L Loose unary true not
X Comma operator , p5=>
- X List infix Z minmax X X~X X*X XeqvX
+ X List infix Z minmax X X~X X*X XeqvX ...
R List prefix : print push say die map substr ... [+] [*] any $ @
X Loose and and andthen
X Loose or or xor orelse
@@ -1584,6 +1584,75 @@

See L</Cross operators>.

+=item *
+
+C<< infix:<...> >>, the series operator.
+
+This operator takes a concrete list on its left and a function to be
+iterated on its right when the list must be extended.
+
+The value of the operator is the lazy list formed of the
+concrete list followed by the result of applying the function to the
+tail of the list as needed. The function indicates by its arity
+how many of the preceding values to pay attention to (and which the
+operator must track internally). Demonstration of this falls to the
+lot of the venerable Fibonacci sequence:
+
+ 1, 1 ... { $^y + $^z } # 1,1,2,3,5,8...
+ 1, 1 ... &infix:<+> # 1,1,2,3,5,8...
+
+More typically the function is unary, in which case any extra values
+in the list may be construed as human-readable documentation:
+
+ 0,2,4 ... { $_ + 2 } # same as 1..*:by(2)
+ <a b c> ... { .succ } # same as 'a'..*
+
+The function need not be monotonic, of course:
+
+ 1 ... { -$_ } # 1, -1, 1, -1, 1, -1...
+ False ... &prefix:<!> # False, True, False...
+
+The function can be 0-ary as well:
+
+ () ... &rand # list of random numbers
+
+If the right operand is C<*> (Whatever) and the sequence is obviously
+arithmetic or geometric, the appropriate function is deduced:
+
+ 1, 3, 5 ... * # odd numbers
+ 1. 2. 4 ... * # powers of 2
+
+Conjecture: other such patterns may be recognized in the future,
+depending on which unrealistic benchmark we want to run faster. C<:)>
+
+Note: the yada operator is recognized only where a term is expected.
+This operator may only be used where an infix is expected. If you
+put a comma before the C<...> it will be taken as a yada list operator
+expressing the desire to fail when the list reaches that point:
+
+ 1..20, ... "I only know up to 20 so far mister"
+
+If the yada operator finds a closure for its argument at compile time,
+it should probably whine about the fact that it's difficult to turn
+a closure into an error message. Alternately, we could treat
+an elipsis as special when it follows a comma to better support
+traditional math notation.
+
+The function may choose to terminate its list by returning ().
+Since this operator is list associative, an inner function may be
+followed by a C<...> and another function to continue the list,
+and so on. Hence,
+
+ 1 ... { $_ + 1 if $_ < 10 }
+ ... { $_ + 10 if $_ < 100 }
+ ... { $_ + 100 if $_ < 1000 }
+
+produces
+
+ 1,2,3,4,5,6,7,8,9,
+ 10,20,30,40,50,60,7­0,80,90,
+ 100,200,300,400,500­,600,700,800,900
+
=back

Many of these operators return a list of Captures, which depending on
comment 9 answers | Add comment
[svn:perl6-synopsis]­ r14588 - doc/trunk/design/sy­n Guest 05:15:19
 Author: larry
Date: Mon Oct 6 18:15:17 2008
New Revision: 14588

Modified:
doc/trunk/design/sy­n/S05.pod

Log:
Added ~ twiddle macro to make it easier to write bracketing constructs.


Modified: doc/trunk/design/sy­n/S05.pod
===================­====================­====================­===================
--- doc/trunk/design/sy­n/S05.pod (original)
+++ doc/trunk/design/sy­n/S05.pod Mon Oct 6 18:15:17 2008
@@ -14,9 +14,9 @@
Maintainer: Patrick Michaud <pmichaud@pobox.com­> and
Larry Wall <larry@wall.org>
Date: 24 Jun 2002
- Last Modified: 7 Jul 2008
+ Last Modified: 6 Oct 2008
Number: 5
- Version: 83
+ Version: 84

This document summarizes Apocalypse 5, which is about the new regex
syntax. We now try to call them I<regex> rather than "regular
@@ -685,6 +685,59 @@

[ <ident> !~~ 'moose' ] || 'squirrel'

+=item *
+
+The C<~> operator is a helper for matching nested subrules with a
+specific terminator as the goal. It appears to be placed between the
+opening and closing bracket, like so:
+
+ '(' ~ ')' <expression>
+
+However, it mostly ignores the left argument, and operates on the next
+two atoms (which may be quantified). Its operation on those next
+two atoms is to "twiddle" them so that they are actually matched in
+reverse order. Hence the expression above, at first blush, is merely
+shortand for:
+
+ '(' <expression> ')'
+
+But beyond that, when it rewrites the atoms it also inserts the
+apparatus that will set up the inner expression to recognize the
+terminator, and to produce an appropriate error message if the
+inner expression does not terminate on the required closing atom.
+So it really does pay attention to the left bracket as well, and it
+actually rewrites our example to something more like:
+
+ $<OPEN> = '(' <SETGOAL: ')'> <expression> [ $GOAL || <FAILGOAL> ]
+
+Note that you can use this construct to set up expectations for
+a closing construct even when there's no opening bracket:
+
+ <null> ~ ')' \d+
+
+By default the error message uses the name of the current rule as an
+indicator of the abstract goal of the parser at that point. However,
+often this is not terribly informative, especially when rules are named
+according to an internal scheme that will not make sense to the user.
+The C<:dba> ("doing business as") adverb may be used to set up a more informative name for
+what the following code is trying to parse:
+
+ token postfix:sym<[ ]> {
+ :dba<array subscript>
+ '[' ~ ']' <expression>
+ }
+
+Then instead of getting a message like:
+
+ Unable to parse expression in postfix:sym<[ ]>; couldn't find final ']'
+
+you'll get a message like:
+
+ Unable to parse expression in array subscript; couldn't find final ']'
+
+(The C<:dba> adverb may also be used to give names to alternations
+and alternatives, which helps the lexer give better error messages.)
+
=back

=head1 Bracket rationalization
Add comment
Monday, 6 October 2008
[svn:perl6-synopsis]­ r14587 - doc/trunk/design/sy­n Guest 06:14:14
 Author: larry
Date: Sun Oct 5 19:14:11 2008
New Revision: 14587

Modified:
doc/trunk/design/sy­n/S03.pod

Log:
typos


Modified: doc/trunk/design/sy­n/S03.pod
===================­====================­====================­===================
--- doc/trunk/design/sy­n/S03.pod (original)
+++ doc/trunk/design/sy­n/S03.pod Sun Oct 5 19:14:11 2008
@@ -1620,7 +1620,7 @@
arithmetic or geometric, the appropriate function is deduced:

1, 3, 5 ... * # odd numbers
- 1. 2. 4 ... * # powers of 2
+ 1, 2, 4 ... * # powers of 2

Conjecture: other such patterns may be recognized in the future,
depending on which unrealistic benchmark we want to run faster. C<:)>
@@ -1635,7 +1635,7 @@
If the yada operator finds a closure for its argument at compile time,
it should probably whine about the fact that it's difficult to turn
a closure into an error message. Alternately, we could treat
-an elipsis as special when it follows a comma to better support
+an ellipsis as special when it follows a comma to better support
traditional math notation.

The function may choose to terminate its list by returning ().
Add comment
Sunday, 5 October 2008
[svn:perl6-synopsis]­ r14585 - doc/trunk/design/sy­n Guest 18:11:21
 Author: larry
Date: Wed Oct 1 12:54:11 2008
New Revision: 14585

Modified:
doc/trunk/design/sy­n/S03.pod

Log:
Revision to accumulator semantics so that -= dwims


Modified: doc/trunk/design/sy­n/S03.pod
===================­====================­====================­===================
--- doc/trunk/design/sy­n/S03.pod (original)
+++ doc/trunk/design/sy­n/S03.pod Wed Oct 1 12:54:11 2008
@@ -3251,8 +3251,20 @@

If you apply an assignment operator to a protoobject, it is assumed that
you are implementing some kind of notional "reduction" to an accumulator
-variable. To that end, the base operator is dropped and a simple
-assignment is done instead. Hence you may correctly write:
+variable. To that end, the operation is defined in terms
+of the corresponding reduction operator, where the protoobject
+becomes the operator's identify value. So if you say:
+
+ $x -= 1;
+
+it is more or less equivalent to:
+
+ $x = [-]() unless defined $x; # 0 for [-]()
+ $x = $x - 1;
+
+and $x ends up with -1 in it, as expected.
+
+Hence you may correctly write:

my Num $prod;
for @factors -> $f {
comment 2 answer | Add comment
Saturday, 4 October 2008
Carry Variable to Form Mike Flannigan 18:02:23
 
I have an html file that parses passed parameters with
this code:
___________________­_________________

<script type="text/javascri­pt">

var query = location.href.subst­ring((location.href.­indexOf('?')+1),
location.href.lengt­h);
if(location.href.in­dexOf('?') < 0) query = '';
querysplit = query.split('&');
query = new Array();

for(var i = 0; i < querysplit.length; i++){
var namevalue = querysplit[i].split('=­');
namevalue[1] = namevalue[1].replace(/­\+/g, ' ');
query[namevalue[0]] = unescape(namevalue[1])­;
}

window.onload = function(){
// Do stuff with query string data here.

document.getElement­ById('state').innerH­TML = query['state'];
}

var value = <span id='state'></span>;­

</script>

<HTML>
<HEAD>
<TITLE>Title</TITLE­>
</HEAD>
<BODY>

<p>The valve is <span id='state'></span> </p>

</body>
</html>
___________________­_________________



All that works fine.

Then I try to copy the parsed value in the Subject field
as follows:


___________________­_________________

<FORM
ACTION="http://lots­ofstuffhere&confirm=­confirmed.html&error­=error.html"
METHOD="POST">
<INPUT NAME="recipient" TYPE="HIDDEN" VALUE="myemail">
<TABLE>
<TR>
<TD valign=middle>Your Name:</TD>
<TD><INPUT NAME="name" SIZE="30"></TD>
</TR>
<TR>
<TD valign=middle>Your E-mail:</TD>
<TD><INPUT NAME="e-mail" SIZE="30"></TD>
</TR>
<TR>
<TD valign=middle>Link:­</TD>
<TD><INPUT NAME="link" SIZE="60" VALUE="Some Link"></TD>
</TR>
<TR>
<TD valign=middle>Subje­ct:</TD>
<TD><INPUT NAME="subject" SIZE="60" VALUE=<span id='state'></span>>­</TD>
</TR>
<TR>
<TD valign=top><BR>Comm­ents:</TD>
<TD><TEXTAREA NAME="body" VALUE="" cols=60 rows=10></TEXTAREA>­</TD>
</TR>
<INPUT NAME="followup-page­" TYPE="HIDDEN" VALUE="http://www.m­yprogram">
<TR>
<TD></TD>
<TD><INPUT TYPE="submit" name="submit" VALUE="Send"></TD>
</TR>
</TABLE>
</FORM>
___________________­_________________



This does not work. It puts "<span" in the subject field.

Is it because of scoping? How can I get this to work? I tried
literally 40 different things, but none worked. I also spent
roughly 4 hours searching for a solution.

I can get this done with a Perl file, but unfortunately my
Webserver will not run it properly.


Mike

comment 4 answer | Add comment
globs and rules and trees, oh my! (was: Re: XPath grammars (Was: Re: globs and trees in Perl6)) Timothy S. Nelson 04:48:18
 On Fri, 3 Oct 2008, Timothy S. Nelson wrote:

On Fri, 3 Oct 2008, Timothy S. Nelson wrote:
On Thu, 2 Oct 2008, Timothy S. Nelson wrote:
Now that Perl6 is in the mix, though, I think that the best way to do
it is to make roles that model eg. Nodes, Plexes (Documents), Elements,
and the like, and then have operators on them do all the work (like my
idea of using a slash for a combined feed and call code operator). I
could be wrong, but it seems to me that we could get something that's
somewhat like XPath this way, without having to worry about defining an
XPath grammar or anything.
I'm talking to myself here :)­. The guys on IRC convinced me that the
way to go might be something like a grammar, but that does trees and tree
transformations instead of a text input stream. See the IRC log for
details :)­.
Talking to myself again. I'm not as convinced as I was. I'll write
up a long post about that if necessary, but want to get something else
figured out first. First, a paste from the IRC log:
<TimToady> note to treematching folks: it is envisaged that signatures in a
rule will match nodes in a tree
My question is, how is this expected to work? Can someone give an
example?

I'm assuming that this relates to Jon Lang's comment about using rules
to match non-strings.

I'm starting to see how *matching* would work now. But how would it
be if I wanted to search a tree for all nodes whose "readonly" attribute were
true, and return an array of those nodes? Hmm. Or something like the
following XPath...

/html/body//p/a[@name = "#SampleName"]

(my XPath isn't that great, but I'm assuming this will find all a tags
in the html body that are the direct descendant of a paragraph, and have their
@name attribute set to "#SampleName"). My guess is something like this:

$htmlobject = HTML->new();

$htmlobject.childre­n()
==> grep { /html/ } ==> map { .children() }
==> grep { /body/ } ==> map { .children() }
==> recursivegrep { /p/ } ==> map { .children() }
==> grep { /a/ and .name eq "#Samplename" } ==> $anchors

I'm guessing that might do it (although the tree role and
recursivegrep would also require some work). But the syntax is dreadful :)­.
You can see why I was talking about having a feed operator that did a grep
and got children as well as doing the feed. But no doubt I'm missing
something here. And I'm still thinking like a Perl5 programmer :)­.

:)­


-------------------­--------------------­--------------------­----------
| Name: Tim Nelson | Because the Creator is, |
| E-mail: wayland@wayland.id.­au | I am |
-------------------­--------------------­--------------------­----------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V-
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

comment 1 answer | Add comment
Friday, 3 October 2008
Re: XPath grammars (Was: Re: globs and trees in Perl6) Timothy S. Nelson 04:15:52
 On Thu, 2 Oct 2008, Daniel Ruoso wrote:

One thing we realized at that time is that XPath is good enough, even if
it seems to be adressing XML specifically, it has the concept of
"dimension" that can be extended to represent arbitrary aspects of
objects.

Hmm. Back in March, before I discovered that perl6 was actually far
enough along to start using a bit, I wrote an article which includes
information about what I do and don't like about XPath:

http://computerstuf­f.jdarx.info/content­/treepath-universal-­tree-navigation-lang­uage

It basically recommends that there be two path dialects, Complex
TreePath (which is basically XPath) and Simple TreePath (which is basically a
somewhat modified version of glob).

Now that Perl6 is in the mix, though, I think that the best way to do
it is to make roles that model eg. Nodes, Plexes (Documents), Elements, and
the like, and then have operators on them do all the work (like my idea of
using a slash for a combined feed and call code operator). I could be wrong,
but it seems to me that we could get something that's somewhat like XPath this
way, without having to worry about defining an XPath grammar or anything.

:)­


-------------------­--------------------­--------------------­----------
| Name: Tim Nelson | Because the Creator is, |
| E-mail: wayland@wayland.id.­au | I am |
-------------------­--------------------­--------------------­----------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V-
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

comment 5 answers | Add comment
Thursday, 2 October 2008
HP's Testdrive being replaced. Michael G Schwern 10:24:45
 I just found this out, and I assume others here occasionally make use of
testdrive and don't know.

HP is shutting down it's testdrive program which gives logins to its many
operating systems (see also VMS) for developer evaluation and testing. It's
replacing it with something called HP Partner Virtualization Program which it
says is better and will make you smell nice and be more attractive.

For more info...
http://www.hp.com/g­o/pvp
http://www.hp.com/g­o/dspp

They did make one note that OpenVMS is not yet part of HP PVP, so that part of
testdrive will remain open until it is. *whew*


--
Insulting our readers is part of our business model.
http://somethingpos­itive.net/sp07122005­.shtml

comment 3 answer | Add comment
DBD::Oracle on Linux 64bit Сотников Роман Валерьевич 06:37:52
 Hi,

I try to install DBD::Oracle 1.22 on RHEL4-U4-x86_64-AS Red Hat.
Version of Oracle cleint is: 9.2.0.7

Perl version is:
[root@nsk-fm02 DBD-Oracle-1.22]# perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
Platform:
osname=linux, osvers=2.6.9-22.18.­bz155725.elsmp, archname=x86_64-lin­ux-thread-multi
uname='linux hs20-bc1-3.build.re­dhat.com 2.6.9-22.18.bz15572­5.elsmp #1 smp thu nov 17 15:34:08 est 2005 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Doptimize=-O2 -g -pipe -m64 -Dversion=5.8.5 -Dmyhostname=localh­ost -Dperladmin=root@lo­calhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/us­r -Dprefix=/usr -Dlibpth=/usr/local­/lib64 /lib64 /usr/lib64 -Dprivlib=/usr/lib/­perl5/5.8.5 -Dsitelib=/usr/lib/­perl5/site_perl/5.8.­5 -Dvendorlib=/usr/li­b/perl5/vendor_perl/­5.8.5 -Darchlib=/usr/lib6­4/perl5/5.8.5/x86_64­-linux-thread-multi -Dsitearch=/usr/lib­64/perl5/site_perl/5­.8.5/x86_64-linux-th­read-multi -Dvendorarch=/usr/l­ib64/perl5/vendor_pe­rl/5.8.5/x86_64-linu­x-thread-multi -Darchname=x86_64-l­inux -Dvendorprefix=/usr­ -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl­ -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/le­ss -isr -Dinc_version_list=­5.8.4 5.8.3 5.8.2 5.8.1 5.8.0'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=unde­f useithreads=define usemultiplicity=def­ine
useperlio=define d_sfio=undef uselargefiles=defin­e usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef­
usemymalloc=n, bincompat5005=undef­
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasin­g -pipe -I/usr/local/includ­e -D_LARGEFILE_SOURCE­ -D_FILE_OFFSET_BITS­=64 -I/usr/include/gdbm­',
optimize='-O2 -g -pipe -m64',
cppflags='-D_REENTR­ANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasin­g -pipe -I/usr/local/includ­e -I/usr/include/gdbm­'
ccversion='', gccversion='3.4.6 20060404 (Red Hat 3.4.6-2)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =''
libpth=/usr/local/l­ib64 /lib64 /usr/lib64
libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.3.­3.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.­3.4'
Dynamic Linking:
dlsrc=dl_dlopen.xs,­ dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib­64/perl5/5.8.5/x86_6­4-linux-thread-multi­/CORE'
cccdlflags='-fPIC',­ lddlflags='-shared'­


Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES PERL_IMPLICIT_CONTE­XT
Built under linux
Compiled at Jul 24 2006 18:28:14
@INC:
/usr/lib64/perl5/5.­8.5/x86_64-linux-thr­ead-multi
/usr/lib/perl5/5.8.­5
/usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi
/usr/lib64/perl5/si­te_perl/5.8.4/x86_64­-linux-thread-multi
/usr/lib64/perl5/si­te_perl/5.8.3/x86_64­-linux-thread-multi
/usr/lib64/perl5/si­te_perl/5.8.2/x86_64­-linux-thread-multi
/usr/lib64/perl5/si­te_perl/5.8.1/x86_64­-linux-thread-multi
/usr/lib64/perl5/si­te_perl/5.8.0/x86_64­-linux-thread-multi
/usr/lib/perl5/site­_perl/5.8.5
/usr/lib/perl5/site­_perl/5.8.4
/usr/lib/perl5/site­_perl/5.8.3
/usr/lib/perl5/site­_perl/5.8.2
/usr/lib/perl5/site­_perl/5.8.1
/usr/lib/perl5/site­_perl/5.8.0
/usr/lib/perl5/site­_perl
/usr/lib64/perl5/ve­ndor_perl/5.8.5/x86_­64-linux-thread-mult­i
/usr/lib64/perl5/ve­ndor_perl/5.8.4/x86_­64-linux-thread-mult­i
/usr/lib64/perl5/ve­ndor_perl/5.8.3/x86_­64-linux-thread-mult­i
/usr/lib64/perl5/ve­ndor_perl/5.8.2/x86_­64-linux-thread-mult­i
/usr/lib64/perl5/ve­ndor_perl/5.8.1/x86_­64-linux-thread-mult­i
/usr/lib64/perl5/ve­ndor_perl/5.8.0/x86_­64-linux-thread-mult­i
/usr/lib/perl5/vend­or_perl/5.8.5
/usr/lib/perl5/vend­or_perl/5.8.4
/usr/lib/perl5/vend­or_perl/5.8.3
/usr/lib/perl5/vend­or_perl/5.8.2
/usr/lib/perl5/vend­or_perl/5.8.1
/usr/lib/perl5/vend­or_perl/5.8.0
/usr/lib/perl5/vend­or_perl
.
Press any key to continue...



First, I try to run perl Makefile.PL and got an error like this:

[root@nsk-fm02 DBD-Oracle-1.22]# perl Makefile.PL
Multiple copies of Driver.xst found in: /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/ /usr/lib64/perl5/ve­ndor_perl/5.8.5/x86_­64-linux-thread-mult­i/auto/DBI/ at Makefile.PL line 37
Using DBI 1.607 (for perl 5.008005 on x86_64-linux-thread­-multi) installed in /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/

Configuring DBD::Oracle for perl 5.008005 on linux (x86_64-linux-threa­d-multi)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a linux, Ver#2.6
Using Oracle in /u01/app/oracle/pro­duct/9.2.0
DEFINE _SQLPLUS_RELEASE = "902000700" (CHAR)
Oracle version 9.2.0.7 (9.2)
Found /u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o/demo_rdbms.mk
Found /u01/app/oracle/pro­duct/9.2.0/rdbms/lib­/ins_rdbms.mk
Found /u01/app/oracle/pro­duct/9.2.0/precomp/d­emo/proc/demo_proc.m­k
Using /u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o/demo_rdbms.mk
Your LD_LIBRARY_PATH env var is set to '/u01/app/oracle/pr­oduct/9.2.0/lib'
Reading /u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o/demo_rdbms.mk
Reading /u01/app/oracle/pro­duct/9.2.0/rdbms/lib­/env_rdbms.mk

Attempting to discover Oracle OCI build rules
gcc -c -o DBD_ORA_OBJ.o DBD_ORA_OBJ.c
by executing: [make -f /u01/app/oracle/product/9.2.0/rdbms/demo/demo_rdbms.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o]
Oracle oci build command:
[true -L/u01/app/oracle/product/9.2.0/lib/ -L/u01/app/oracle/product/9.2.0/rdbms/lib/ -o DBD_ORA_EXE DBD_ORA_OBJ.o -lclntsh `cat /u01/app/oracle/product/9.2.0/lib/sysliblist` -ldl -lm ]

Found header files in /u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o /u01/app/oracle/pro­duct/9.2.0/rdbms/pub­lic.

Checking for functioning wait.ph


System: perl5.008005 linux hs20-bc1-3.build.re­dhat.com 2.6.9-22.18.bz15572­5.elsmp #1 smp thu nov 17 15:34:08 est 2005 x86_64 x86_64 x86_64 gnulinux
Compiler: gcc -O2 -g -pipe -m64 -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasin­g -pipe -I/usr/local/includ­e -D_LARGEFILE_SOURCE­ -D_FILE_OFFSET_BITS­=64 -I/usr/include/gdbm­
Linker: /usr/bin/ld
Sysliblist: -ldl -lm -lpthread -lnsl
Oracle makefiles would have used these definitions but we override them:
CC: gcc
CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\
$(SHARED_CFLAG) $(USRFLAGS)
[$(GFLAG) -O3 $(CDEBUG) -m32 -trigraphs -fPIC -I/u01/app/oracle/product/9.2.0/rdbms/demo -I/u01/app/oracle/product/9.2.0/rdbms/public -I/u01/app/oracle/product/9.2.0/plsql/public -I/u01/app/oracle/product/9.2.0/network/public -DLINUX -DORAX86_64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS -DLONG_IS_64 -fno-strict-aliasing -DSS_64BIT_SERVER $(LPFLAGS) $(USRFLAGS)]
LDFLAGS: $(LDFLAGS32)
[-m32 -o $@ -L/u01/app/oracle/product/9.2.0/rdbms//lib32/ -L/u01/app/oracle/product/9.2.0/lib32/ -L/u01/app/oracle/product/9.2.0/lib32/stubs/]
Linking with OTHERLDFLAGS = -L/u01/app/oracle/p­roduct/9.2.0/lib/ -L/u01/app/oracle/p­roduct/9.2.0/rdbms/l­ib/ -lclntsh `cat /u01/app/oracle/pro­duct/9.2.0/lib/sysli­blist` -ldl -lm [from 'build' rule]

Checking if your kit is complete...

Warning: the following files are missing in your kit:
META.yml
Please inform the author.

LD_RUN_PATH=/u01/ap­p/oracle/product/9.2­.0/lib:/u01/app/orac­le/product/9.2.0/rdb­ms/lib
Using DBD::Oracle 1.22.
Using DBD::Oracle 1.22.
Multiple copies of Driver.xst found in: /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/ /usr/lib64/perl5/ve­ndor_perl/5.8.5/x86_­64-linux-thread-mult­i/auto/DBI/ at Makefile.PL line 1693
Using DBI 1.607 (for perl 5.008005 on x86_64-linux-thread­-multi) installed in /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/
Writing Makefile for DBD::Oracle

*** If you have problems...
read all the log printed above, and the README and README.help.txt files.
(Of course, you have read README by now anyway, haven't you?)

Press any key to continue...

I've read the bug trace on CPAN, and got an analogical bud ID 38882. But, package 1.22 didn't have file META.yml, so
I've cut line "META.yml Module meta-data (added by MakeMaker)" in the MANIFEST and got an more or less successfully makefile.


The log of Makefile.PL is:
[root@nsk-fm02 DBD-Oracle-1.22]# perl Makefile.PL
Multiple copies of Driver.xst found in: /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/ /usr/lib64/perl5/ve­ndor_perl/5.8.5/x86_­64-linux-thread-mult­i/auto/DBI/ at Makefile.PL line 37
Using DBI 1.607 (for perl 5.008005 on x86_64-linux-thread­-multi) installed in /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/

Configuring DBD::Oracle for perl 5.008005 on linux (x86_64-linux-threa­d-multi)

Remember to actually *READ* the README file! Especially if you have any problems.

Installing on a linux, Ver#2.6
Using Oracle in /u01/app/oracle/pro­duct/9.2.0
DEFINE _SQLPLUS_RELEASE = "902000700" (CHAR)
Oracle version 9.2.0.7 (9.2)
Found /u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o/demo_rdbms.mk
Found /u01/app/oracle/pro­duct/9.2.0/rdbms/lib­/ins_rdbms.mk
Found /u01/app/oracle/pro­duct/9.2.0/precomp/d­emo/proc/demo_proc.m­k
Using /u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o/demo_rdbms.mk
Your LD_LIBRARY_PATH env var is set to '/u01/app/oracle/pr­oduct/9.2.0/lib'
Reading /u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o/demo_rdbms.mk
Reading /u01/app/oracle/pro­duct/9.2.0/rdbms/lib­/env_rdbms.mk

Attempting to discover Oracle OCI build rules
gcc -c -I/u01/app/oracle/p­roduct/9.2.0/rdbms/d­emo -I/u01/app/oracle/p­roduct/9.2.0/rdbms/p­ublic -I/u01/app/oracle/p­roduct/9.2.0/rdbms/d­emo -I/u01/app/oracle/p­roduct/9.2.0/rdbms/p­ublic -I/u01/app/oracle/p­roduct/9.2.0/plsql/p­ublic -I/u01/app/oracle/p­roduct/9.2.0/network­/public -I/usr/lib64/perl5/­site_perl/5.8.5/x86_­64-linux-thread-mult­i/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasin­g -pipe -I/usr/local/includ­e -D_LARGEFILE_SOURCE­ -D_FILE_OFFSET_BITS­=64 -I/usr/include/gdbm­ -O2 -g -pipe -m64 -DVERSION=\"1.22\" -DXS_VERSION=\"1.22­\" -fPIC "-I/usr/lib64/perl5­/5.8.5/x86_64-linux-­thread-multi/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\­"9.2.0.7\" DBD_ORA_OBJ.c
by executing: [make -f /u01/app/oracle/product/9.2.0/rdbms/demo/demo_rdbms.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=true OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o]
Oracle oci build command:
[true -L/u01/app/oracle/product/9.2.0/lib/ -L/u01/app/oracle/product/9.2.0/rdbms/lib/ -o DBD_ORA_EXE DBD_ORA_OBJ.o -lclntsh `cat /u01/app/oracle/product/9.2.0/lib/sysliblist` -ldl -lm ]

Found header files in /u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o /u01/app/oracle/pro­duct/9.2.0/rdbms/pub­lic.

Checking for functioning wait.ph


System: perl5.008005 linux hs20-bc1-3.build.re­dhat.com 2.6.9-22.18.bz15572­5.elsmp #1 smp thu nov 17 15:34:08 est 2005 x86_64 x86_64 x86_64 gnulinux
Compiler: gcc -O2 -g -pipe -m64 -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasin­g -pipe -I/usr/local/includ­e -D_LARGEFILE_SOURCE­ -D_FILE_OFFSET_BITS­=64 -I/usr/include/gdbm­
Linker: /usr/bin/ld
Sysliblist: -ldl -lm -lpthread -lnsl
Oracle makefiles would have used these definitions but we override them:
CC: gcc
CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS)\
$(SHARED_CFLAG) $(USRFLAGS)
[$(GFLAG) -O3 $(CDEBUG) -m32 -trigraphs -fPIC -I/u01/app/oracle/product/9.2.0/rdbms/demo -I/u01/app/oracle/product/9.2.0/rdbms/public -I/u01/app/oracle/product/9.2.0/plsql/public -I/u01/app/oracle/product/9.2.0/network/public -DLINUX -DORAX86_64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS -DLONG_IS_64 -fno-strict-aliasing -DSS_64BIT_SERVER $(LPFLAGS) $(USRFLAGS)]
LDFLAGS: $(LDFLAGS32)
[-m32 -o $@ -L/u01/app/oracle/product/9.2.0/rdbms//lib32/ -L/u01/app/oracle/product/9.2.0/lib32/ -L/u01/app/oracle/product/9.2.0/lib32/stubs/]
Linking with OTHERLDFLAGS = -L/u01/app/oracle/p­roduct/9.2.0/lib/ -L/u01/app/oracle/p­roduct/9.2.0/rdbms/l­ib/ -lclntsh `cat /u01/app/oracle/pro­duct/9.2.0/lib/sysli­blist` -ldl -lm [from 'build' rule]

LD_RUN_PATH=/u01/ap­p/oracle/product/9.2­.0/lib:/u01/app/orac­le/product/9.2.0/rdb­ms/lib
Using DBD::Oracle 1.22.
Using DBD::Oracle 1.22.
Multiple copies of Driver.xst found in: /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/ /usr/lib64/perl5/ve­ndor_perl/5.8.5/x86_­64-linux-thread-mult­i/auto/DBI/ at Makefile.PL line 1693
Using DBI 1.607 (for perl 5.008005 on x86_64-linux-thread­-multi) installed in /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/
Writing Makefile for DBD::Oracle

*** If you have problems...
read all the log printed above, and the README and README.help.txt files.
(Of course, you have read README by now anyway, haven't you?)

Press any key to continue...

After that, I've tried to make...
[root@nsk-fm02 DBD-Oracle-1.22]# make
cp Oracle.pm blib/lib/DBD/Oracle­.pm
cp oraperl.ph blib/lib/oraperl.ph­
cp dbdimp.h blib/arch/auto/DBD/­Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/­Oracle/ocitrace.h
cp Oraperl.pm blib/lib/Oraperl.pm­
cp Oracle.h blib/arch/auto/DBD/­Oracle/Oracle.h
cp lib/DBD/Oracle/GetI­nfo.pm blib/lib/DBD/Oracle­/GetInfo.pm
cp mk.pm blib/arch/auto/DBD/­Oracle/mk.pm
/usr/bin/perl -p -e "s/~DRIVER~/Oracle/­g" /usr/lib64/perl5/si­te_perl/5.8.5/x86_64­-linux-thread-multi/­auto/DBI/Driver.xst > Oracle.xsi
/usr/bin/perl /usr/lib/perl5/5.8.­5/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.­5/ExtUtils/typemap -typemap typemap Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
gcc -c -I/u01/app/oracle/p­roduct/9.2.0/rdbms/d­emo -I/u01/app/oracle/p­roduct/9.2.0/rdbms/p­ublic -I/u01/app/oracle/p­roduct/9.2.0/rdbms/d­emo -I/u01/app/oracle/p­roduct/9.2.0/rdbms/p­ublic -I/u01/app/oracle/p­roduct/9.2.0/plsql/p­ublic -I/u01/app/oracle/p­roduct/9.2.0/network­/public -I/usr/lib64/perl5/­site_perl/5.8.5/x86_­64-linux-thread-mult­i/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasin­g -pipe -I/usr/local/includ­e -D_LARGEFILE_SOURCE­ -D_FILE_OFFSET_BITS­=64 -I/usr/include/gdbm­ -O2 -g -pipe -m64 -DVERSION=\"1.22\" -DXS_VERSION=\"1.22­\" -fPIC "-I/usr/lib64/perl5­/5.8.5/x86_64-linux-­thread-multi/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\­"9.2.0.7\" Oracle.c
In file included from Oracle.xs:1:
Oracle.h:115: error: conflicting types for 'OCIXMLTypeCreateFr­omSrc'
Oracle.h:115: note: an argument type that has a default promotion can't match an empty parameter name list declaration
/u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o/ociap.h:10054: error: previous declaration of 'OCIXMLTypeCreateFr­omSrc' was here
Oracle.h:115: error: conflicting types for 'OCIXMLTypeCreateFr­omSrc'
Oracle.h:115: note: an argument type that has a default promotion can't match an empty parameter name list declaration
/u01/app/oracle/pro­duct/9.2.0/rdbms/dem­o/ociap.h:10054: error: previous declaration of 'OCIXMLTypeCreateFr­omSrc' was here
make: *** [Oracle.o] Error 1

I've also read the README files, but didn't find anything like that.
Do you have any ideas?
Thanks!

Best regards,
Roman Sotnikov


comment 2 answer | Add comment
Need a small VMS test Michael G Schwern 06:27:07
 Hi, I need a quick VMS test for the new code to detect the range of time_t.

If someone would please compile and run this little program on VMS and let me
know the result that would be helpful. Thanks.

http://code.google.­com/p/y2038/source/b­rowse/trunk/bin/chec­k_max.c


--
52. Not allowed to yell "Take that Cobra" at the rifle range.
-- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
http://skippyslist.­com/list/

comment 10 answers | Add comment
Wednesday, 1 October 2008
[svn:perl6-synopsis]­ r14584 - doc/trunk/design/sy­n Guest 21:17:48
 Author: larry
Date: Wed Oct 1 10:17:47 2008
New Revision: 14584

Modified:
doc/trunk/design/sy­n/S03.pod

Log:
typo from Bob Rogers++


Modified: doc/trunk/design/sy­n/S03.pod
===================­====================­====================­===================
--- doc/trunk/design/sy­n/S03.pod (original)
+++ doc/trunk/design/sy­n/S03.pod Wed Oct 1 10:17:47 2008
@@ -3261,7 +3261,7 @@

While this may seem marginally useful in the scalar variable case,
it's much more important for it to work this way when the modified
-location may have only just been created by autovivificatoin. In other
+location may have only just been created by autovivification. In other
words, if you write:

%prod{$key} *= $f
Add comment
[svn:perl6-synopsis]­ r14583 - doc/trunk/design/sy­n Guest 20:55:36
 Author: larry
Date: Wed Oct 1 09:55:35 2008
New Revision: 14583

Modified:
doc/trunk/design/sy­n/S03.pod

Log:
Describe how assignment metaoperators initialize undefined lvalues.


Modified: doc/trunk/design/sy­n/S03.pod
===================­====================­====================­===================
--- doc/trunk/design/sy­n/S03.pod (original)
+++ doc/trunk/design/sy­n/S03.pod Wed Oct 1 09:55:35 2008
@@ -12,9 +12,9 @@

Maintainer: Larry Wall <larry@wall.org>
Date: 8 Mar 2004
- Last Modified: 10 Sep 2008
+ Last Modified: 1 Oct 2008
Number: 3
- Version: 139
+ Version: 140

=head1 Overview

@@ -3249,6 +3249,26 @@

($a,$b,$c) »+=» 1; # add one to each of three variables

+If you apply an assignment operator to a protoobject, it is assumed that
+you are implementing some kind of notional "reduction" to an accumulator
+variable. To that end, the base operator is dropped and a simple
+assignment is done instead. Hence you may correctly write:
+
+ my Num $prod;
+ for @factors -> $f {
+ $prod *= $f;
+ }
+
+While this may seem marginally useful in the scalar variable case,
+it's much more important for it to work this way when the modified
+location may have only just been created by autovivificatoin. In other
+words, if you write:
+
+ %prod{$key} *= $f
+
+you need not worry about whether the hash element exists yet. If it
+does not, it will simply be initialized with the value of C<$f>.
+
=head2 Negated relational operators

Any infix relational operator may be transformed into its negative
Add comment
Recommended Perl 6 best practices? Conrad Schneiker 19:57:41
 Is there something more up-to-date concerning "Perl 6 best practices" that
are presently-recommend­ed (by p6l or @Larry) than the following item on the
Perl 6 wiki?



<http://www.perlfou­ndation.org/perl6/in­dex.cgi?perl_6_books­_and_media>



Perl 5 Books with Perl 6 Relevance



* "Perl Best Practices" by Damian Conway. Even though this currently
applies to Perl 5, most of the principles also apply to Perl 6. This book is
the semi-officially recommended guideline for people developing core Perl 6
modules and tests.



Until the Perl 6 version of "Perl Best Practices" is (hopefully) available a
year or 2 from now, would it meanwhile be useful to create a Perl 6 wiki
page devoted to this subject, which would be linked to this documentation
page (among others)?



<http://www.perlfou­ndation.org/perl6/in­dex.cgi?documentatio­n>



Best regards,

Conrad Schneiker



<http://www.athenal­ab.com/> www.AthenaLab.com



Official Perl 6 Wiki - <http://www.perlfou­ndation.org/perl6>
http://www.perlfoun­dation.org/perl6



comment 7 answers | Add comment
Tuesday, 30 September 2008
Split with negative limits, and other weirdnesses Moritz Lenz 05:36:00
 Today a patch to rakudo brought up the question what split() should do
if the $limit argument is either zero or negative.

In Perl 5 a negative limit means "unlimited", which we don't have to do
because we have the Whatever star. A limit of 0 is basically ignored.

Here are a few solution I could think of
1) A limit of 0 returns the empty list (you want zero items, you get them)
2) A limit of 0 fail()s
3) non-positive $limit arguments are rejected by the signature (Int
where { $_ > 0 })

Any thoughts?
Moritz



--
Moritz Lenz
http://moritz.faui2­k3.org/ | http://perl-6.de/
comment 10 answers | Add comment
Sunday, 28 September 2008
unicode string to code byte array ? Nyt Memo 21:22:19
 hello..
i am new to cgi perl and now i am writing web site that use mysql
database on japanese font.
I store the data in utf8 and the data in the mysql database table are
as the following form. (this is just example)

---------------
item_name
---------------
&'#20013;&'#30000; ,
&'#12493;&'#12483;&­'#12488:&'#12527:&'#­12540:&'#12463: ,
&'#12469;&'#12540:&­'#12496:&'#12540: ,
&'#65315;&'#65313:&­'#65330; ,

( i added apostrophe(') codes here for appearing codes here, real data
does not include ('))
and real readable data format is ..
-----
item_name
-----
&#20013;&#30000; ,
&#12493;&#12483;&#1­2488;&#12527;&#12540­;&#12463; ,
&#12469;&#12540;&#1­2496;&#12540; ,
&#65315;&#65313;&#6­5330; (this is japanese full width alphanumeric
character, not normal Ascii character)

.............
My problem is that when i try to search this name by SQL statement ,
how can i change the user input data to this code array format(like
"&'#20013;&'#30000;­" ).(here also added apostrophe(') codes for
appearing codes ) I have tried with some code. It was OK to convert
one character.
I tried like that.

my $code = sprintf "%s", ord Encode::decode("sji­s", $char);

this works for single character. So I tried for split string into
character array and to convert each character. But it was not ok.I
tried for splitting unicode string into character array using
"split()" like that.
my @StrAry = split(//,$srcStr);

But it was only ok for normal string and cannot divide unicode string.

So, please let me know if there any good solution for that.

I want to write for the sql statement like "SELECT * FROM table1 WHERE
item_name LIKE '&#12493;&#12483;&#­12488;&#12527;%' " and which should
result &#12493;&#12483;&#1­2488;&#12527;&#12540­;&#12463;
I tried like this and it was oK "SELECT * FROM table1 WHERE item_name
LIKE '&#12493;%' " and which reults well.
But i cannot change user input string to related code array.

So, please help me if anyone know about unicode and mysql ,cgi perl.

Thnaks in advance
thu

Add comment
Saturday, 27 September 2008
Re: [perl #59396] [PATCH] Implementation of Hash.reverse. Moritz Lenz 20:32:19
 Patrick R. Michaud via RT wrote:
It feels a little weird to have 'reverse' as an exported symbol
here. Based on S29, the exports on 'reverse' mean that we get:
my $str = 'abc';
say reverse $str; # cba
say reverse $str, 5; # 2abc

5abc

my %hash = { a=>1, b=>2, c=>3 };
say reverse %hash; # 1 a\n2 b\n3 c\n
say reverse %hash, 5; # 5\na 1\nb 2\nc 3\n
# note keys and values are not reversed
It just seems a bit odd to me that adding an extra argument causes
the meaning of 'reverse' to change for hashes and strings.

It is weird indeed, but from my grasp of the synopsis it's correct
nonetheless.

But IMHO it feels a bit less weird than the Perl 5 behaviour where the
context decides.

Perl 5:
say reverse "abc"; # abc\n
say scalar reverse "abc"; # cba\n

Maybe the solution is to avoid name conflicts in this case, maybe name
the methods like this:

Str.mirror
List.reverse
Hash.inverse (or Hash.flip)

(I've never been good with names, so there might be much better ones).

Moritz

--
Moritz Lenz
http://perlgeek.de/­ | http://perl-6.de/ | http://sudokugarden­.de/
Add comment
Re: DSN corruption using DBD::Pg - Solver Ron Savage 04:15:32
 Hi Folks

The problem arises after upgrading Postgres but not then recompiling
DBD::Pg.

If using the CPAN shell, use the double-f option:

cpan>fforce install DBD::Pg

--
Ron Savage
ron@savage.net.au
http://savage.net.a­u/index.html



Add comment
Friday, 26 September 2008
ActivePerl 5.10 (1004) with Oracle 8i Patrick Jolliffe 19:26:05
 Have downloaded and installed latest perl version from ActiveState; I
think this comes with a precompiled version on DBD:Oracle 1.21.

Whenever I try to connect to a database I get the error "The procedure
entry point OCIXMLTypeCreateFro­mSrc could not be located in the dynamic
link library OCI.dll". Oracle version is 8.1.7 (8i).

Trying to go through Dynaloader.pm documentation to see why it is trying
to locate this procedure, but I am getting a bit bogged down.

I have raised this via ActiveState support. In the mean time, can
anyone give me any pointers?

comment 5 answers | Add comment
Oracle 10.2 Perl 5.10 Duncan Garland 18:22:38
 Hi,

We're currently upgrading a system. The current system uses Perl 5.6 and
an Oracle 10.1 client. The client is installed on Debian Linux. The
server is installed on Red Hat Linux. The new system runs Debian Lenny
which comes with Perl 5.10. The server is running Oracle 10.2 on Red Hat.

Some of our code has stopped working. It's a very long SQL statement, so
I won't reproduce it here. However, the fetchrow_arrayref statement
returns one correct row followed by a number of empty rows. It works if
I remove the GROUP BY and COUNT statements.

Are there any known issues at the moment?

On second thoughts, I will reproduce the SQL statement:

SELECT row_num,
TO_CHAR(col0) AS "Billing Run ID",
TO_CHAR(col1, 'YYYY-MM-DD') AS "Run Date",
col2 AS "Company Name",
DECODE(col3,'E','Qu­eued or Incomplete','I','Co­mplete','N','Not
even queued',
'X','Generated no invoices',col3) AS "Status",
NVL(TO_CHAR(col4),'­0') AS "Invoices"
FROM (
SELECT ROWNUM AS row_num,
total.col0,
total.col1,
total.col2,
total.col3,
total.col4
FROM (
SELECT
core_select_0.resul­t1 AS col0,
core_select_0.resul­t2 AS col1,
core_select_0.resul­t3 AS col2,
core_select_0.resul­t4 AS col3,
core_select_0.resul­t5 AS col4
FROM (
SELECT
table1.bilr_id AS glue,
table1.bilr_id AS result1,
table1.bilr_run_dat­e AS result2,
table3.comp_name AS result3,
table1.bilr_status AS result4,
COUNT(table2.invo_i­d) AS result5
FROM
billing_runs table1
LEFT JOIN
invoices table2 ON (table2.invo_bilr_i­d
= table1.bilr_id)
LEFT JOIN
companies table3 ON (table3.comp_id =
table1.bilr_comp_id­ AND (table3.comp_delete­d_yna = 'N' AND
table3.comp_demo_fl­ag != 'S'))
WHERE
(table3.comp_id IS NOT NULL)
GROUP BY
table1.bilr_id,
table1.bilr_id,
table1.bilr_run_dat­e,
table3.comp_name,
table1.bilr_status
) core_select_0
ORDER BY
col0 DESC NULLS LAST,
col1 ASC NULLS LAST,
LOWER(LTRIM(col2)) ASC NULLS LAST,
LOWER(LTRIM(col3)) ASC NULLS LAST,
TO_NUMBER(col4) ASC NULLS LAST
) total
)
WHERE rownum <= 10

It's quite long, but it's been running happily for several years and
still runs on its own when pasted into SQL*Plus.

Regards

Duncan

--

*Duncan Garland*
*Perl Programmer*

phone: 08719 955 471
fax: 08719 955 427
e-mail: duncan.garland@tusk­erdirect.com
<mailto:duncan.garl­and@tuskerdirect.com­>


Tuskerdirect Limited, 3 George Street,
Watford, Hertfordshire WD18 0UH


www.tuskerdirect.co­m <http://www.tuskerd­irect.com>






comment 14 answers | Add comment
Does colonpair notation produce a Bool or Int? Patrick R. Michaud 11:09:30
 Lines 46-52 of t/spec/S02-literals­/pairs.t claims that
the colonpair notation should produce a Bool instead of
an Int:

#?rakudo todo 'Adverbial pairs without should produce a Bool (not Int)'
is f2(:­a), "Bool", "':a' is a named";
#?rakudo todo '.() sub calls'
is(f2.(:­a), "Bool", "in 'f2.(:­a)', ':a' is a named");
#?rakudo todo 'Adverbial pairs without should produce a Bool (not Int)'
is $f2(:­a), "Bool", "in '\$f2(:­a)', ':a' is a named";

However, S02 says that C<:a> corresponds to C<< a => 1 >> in
fatarrow notation, which seems to argue that C<:a> should in
fact have an Int value.

Are the tests correct here, or am I reading too much into
the synopsis description?

Pm
comment 1 answer | Add comment

Add new topic:

How:  Register )
 
Логин:   Пароль:   
Комментировать могут: Премодерация:
Topic:
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Perl web-programmingGo to page: « previous | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | next »

see also:
UNIQUE_ID
Visual Basic, *nix and PHP
mail database problem in php
пройди тесты:
see also:
Posting Lookup Values
hallo , j don t know what to write...
mahalo transaction manager

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .