Re: [ANNOUNCE] Attribute::Abstract 0.01

2001-05-19 Thread Damian Conway

That's right Marcel...steal *all* my ideas for the next three months and do
them in two days!

;-)

Damian





Re: Ken Campbell is a god (was: pc components)

2001-05-19 Thread Damian Conway

   Im nogat samting til ridim insait long pastaim Klingon!
   
   Damian (longlong tisa Perlpela)
  
  Lingua::TokPisin::Perlpela?
 
 Nooo!
 
 Damian - as a sponsor, I'm _begging_ you not to do this :)

if that works you just have to hope the blackstar people don't decide
it's a good idea :)

You know, I had been wondering how I was going to find funding to continue
my work next year.

Now it's *obvious*...with a Raskol ransom:

saLIm ManI LOng MI nO rAITim PoiSEn kOmPuTApeLa KolIm tOKpiSIn!


Or maybe I could put the right to stop me writing the module up on eBay?

;-)

Damian





Re: O'Reilly Safari - anyone use it?

2001-05-19 Thread Robin Houston

On Fri, May 18, 2001 at 11:30:28PM +0100, Barry Pretsell wrote:
 It sounds like a good idea (must be better than having 3 editions
 of Programming Perl) and I'm tempted to give it a go, so any Safari
 subscribers out there with an opinion?

Don't forget the ever-fabulous http://corvin.spb.ru/

 .robin.

-- 
God! a red nugget: a fat egg under a dog.



[ANNOUNCE] Devel::SearchINC 0.02

2001-05-19 Thread Marcel Grunauer

NAME
Devel::SearchINC - loading Perl modules from their development dirs

SYNOPSIS
  use Devel::SearchINC '/my/dev/dir';
  use My::Brand::New::Module;

DESCRIPTION
When developing a new module, I always start with

h2xs -XA -n My::Module

This creates a directory with a useful skeleton for the module's
distribution. The directory structure is such, however, that you have to
install the module first (with `make install') before you can use it in
another program or module. For example, bringing in a module like so:

use My::Module;

requires the module to be somewhere in a path listed in `@INC', and the
relative path is expected to be `My/Module.pm'. However, `h2xs' creates
a structure where the module ends up in `My/Module/Module.pm'.

This module tries to compensate for that. The idea is that you `use()'
it right at the beginning of your program so it can modify `@INC' to
look for modules in relative paths of the special structure mentioned
above, starting with directories specified along with the `use()'
statement (i.e. the arguments passed to this module's `import()').

This is useful because with this module you can test your programs using
your newly developed modules without having to install them just so you
can use them. This is especially advantageous when you consider working
on many new modules at the same time.

TODO
Test on different platforms and Perl versions.
BUGS
None known so far. If you find any bugs or oddities, please do inform
the author.

AUTHOR
Marcel Grünauer, [EMAIL PROTECTED]

COPYRIGHT
Copyright 2001 Marcel Grünauer. All rights reserved.

This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

SEE ALSO
perl(1).


Marcel

-- 
We are Perl. Your table will be assimilated. Your waiter will adapt to
service us. Surrender your beer. Resistance is futile.
 -- London.pm strategy aka embrace and extend aka mark and sweep



[ANNOUNCE] DBIx::Lookup::Field 0.01

2001-05-19 Thread Marcel Grunauer

NAME
DBIx::Lookup::Field - Create a lookup hash from a database table

SYNOPSIS
  use DBI;
  use DBIx::Lookup::Field qw/dbi_lookup_field/;

  $dbh = DBI-connect(...);
  my $inst_id = dbi_lookup_field(
  DBH   = $dbh,
  TABLE = 'institution'
  KEY   = 'name',
  VALUE = 'id',
  );

  print Inst_A has id , $inst_id-{Inst_A};

DESCRIPTION
This module provides a way to construct a hash from a database table.
This is useful for the situation where you have to perform many lookups
of a field by using a key from the same table. If, for example, a table
has an id field and a name field and you often have to look up the name
by its id, it might be wasteful to issue many separate SQL queries.
Having the two fields as a hash speeds up processing, although at the
expense of memory.

EXPORTS
dbi_lookup_field()
This function creates a hash from two fields in a database table on
a DBI connection. One field acts as the hash key, the other acts as
the hash value. It expects a parameter hash and returns a reference
to the lookup hash.

The following parameters are accepted. Parameters can be required or
optional. If a required parameter isn't given, an exception is
raised (i.e., it dies).

DBH The database handle through which to access the table from which
to create the lookup. Required.

TABLE
The name of the table that contains the key and value fields.
Required.

KEY The field name of the field that is to act as the hash key.
Required.

VALUE
The field name of the field that is to act as the hash value.
Required.

WHERE
A SQL 'WHERE' clause with which to restrict the 'SELECT'
statement that is used to create the hash. Optional.

BUGS
None known at this time. If you find any oddities or bugs, please do
report them to the author.

AUTHOR
Marcel Grünauer [EMAIL PROTECTED]

COPYRIGHT
Copyright 2001 Marcel Grünauer. All rights reserved.

This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

SEE ALSO
DBI(3pm).


Marcel

-- 
We are Perl. Your table will be assimilated. Your waiter will adapt to
service us. Surrender your beer. Resistance is futile.
 -- London.pm strategy aka embrace and extend aka mark and sweep



[ANNOUNCE] GraphViz::DBI 0.01

2001-05-19 Thread Marcel Grunauer

NAME
GraphViz::DBI - graph database tables and relations

SYNOPSIS
  use GraphViz::DBI;
  print GraphViz::DBI-new($dbh)-graph_tables-as_png;

DESCRIPTION
This module constructs a graph for a database showing tables and
connecting them if they are related. While or after constructing the
object, pass an open database handle, then call `graph_tables' to
determine database metadata and construct a GraphViz graph from the
table and field information.

METHODS
The following methods are defined by this class; all other method calls
are passed to the underlying GraphViz object:

new( [$dbh] )
Constructs the object; also creates a GraphViz object. The
constructor accepts an optional open database handle.

set_dbh($dbh)
Sets the database handle.

get_dbh()
Returns the database handle.

is_table($table)
Checks the database metadata whether the argument is a valid table
name.

is_foreign_key($table, $field)
Determines whether the field belonging to the table is a foreign key
into some other table. If so, it is expected to return the name of
that table. If not, it is expected to return a false value.

For example, if there is a table called product and another table
contains a field called product_id, then to indicate that this
field is a foreign key into the product table, the method returns
product. This is the logic implemented in this class. You can
override this method in a subclass to suit your needs.

graph_tables()
This method goes through all tables and fields and calls appropriate
methods to determine which tables and which dependencies exist, then
hand the results over to GraphViz. It returns the GraphViz object.

TODO
*   Test with various database drivers to see whether they support the
metadata interface.

*   Provide the possibility to name edges to specify the type of
relationship ('has-a', 'is-a', etc.).

BUGS
None known so far. If you find any bugs or oddities, please do inform
the author.

AUTHOR
Marcel Grünauer [EMAIL PROTECTED]

COPYRIGHT
Copyright 2001 Marcel Grünauer. All rights reserved.

This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

SEE ALSO
perl(1), GraphViz(3pm).


Marcel

-- 
We are Perl. Your table will be assimilated. Your waiter will adapt to
service us. Surrender your beer. Resistance is futile.
 -- London.pm strategy aka embrace and extend aka mark and sweep



[ANNOUNCE] GraphViz::ISA 0.01

2001-05-19 Thread Marcel Grunauer

NAME
GraphViz::DBI - graph database tables and relations

SYNOPSIS
  use GraphViz::DBI;
  print GraphViz::DBI-new($dbh)-graph_tables-as_png;

DESCRIPTION
This module constructs a graph for a database showing tables and
connecting them if they are related. While or after constructing the
object, pass an open database handle, then call `graph_tables' to
determine database metadata and construct a GraphViz graph from the
table and field information.

METHODS
The following methods are defined by this class; all other method calls
are passed to the underlying GraphViz object:

new( [$dbh] )
Constructs the object; also creates a GraphViz object. The
constructor accepts an optional open database handle.

set_dbh($dbh)
Sets the database handle.

get_dbh()
Returns the database handle.

is_table($table)
Checks the database metadata whether the argument is a valid table
name.

is_foreign_key($table, $field)
Determines whether the field belonging to the table is a foreign key
into some other table. If so, it is expected to return the name of
that table. If not, it is expected to return a false value.

For example, if there is a table called product and another table
contains a field called product_id, then to indicate that this
field is a foreign key into the product table, the method returns
product. This is the logic implemented in this class. You can
override this method in a subclass to suit your needs.

graph_tables()
This method goes through all tables and fields and calls appropriate
methods to determine which tables and which dependencies exist, then
hand the results over to GraphViz. It returns the GraphViz object.

TODO
*   Test with various database drivers to see whether they support the
metadata interface.

*   Provide the possibility to name edges to specify the type of
relationship ('has-a', 'is-a', etc.).

BUGS
None known so far. If you find any bugs or oddities, please do inform
the author.

AUTHOR
Marcel Grünauer [EMAIL PROTECTED]

COPYRIGHT
Copyright 2001 Marcel Grünauer. All rights reserved.

This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

SEE ALSO
perl(1), GraphViz(3pm).


Marcel

-- 
We are Perl. Your table will be assimilated. Your waiter will adapt to
service us. Surrender your beer. Resistance is futile.
 -- London.pm strategy aka embrace and extend aka mark and sweep



base64 encodings...

2001-05-19 Thread Marcel Grunauer

I've just been informed and shamed to see that all these postings came
through as base64 encoded because of the umlaut in my surname.

I'll get rid of that (no one pronounces that correctly anyway) for
future postings.

Sorry again.

Marcel

--
$ perl -we time
Useless use of time in void context at -e line 1.



p5p drinking games [ilya@math.ohio-state.edu: [PATCH 5.6.1] build bugs OS/2]

2001-05-19 Thread Nicholas Clark

OK. So if we're playing the p5p drinking game,
what and how much do we drink when Ilya sends six messages in a burst?
Do we drink extra because none are part of any existing thread?
Do we drink extra because all six contain patches?
De we drink extra for each that contains comments? Or do we drink extra
for each that doesn't? [This is perhaps the hardest question]

Nicholas Clark
- Forwarded message from Ilya Zakharevich [EMAIL PROTECTED] -

Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Date: Sat, 19 May 2001 04:35:28 -0400
From: Ilya Zakharevich [EMAIL PROTECTED]
To: Mailing list Perl5 [EMAIL PROTECTED]
Subject: [PATCH 5.6.1] build bugs OS/2
User-Agent: Mutt/1.2.5i
X-Spam-Rating: onion.valueclick.com 1.6.2 0/1000/N

Two tiny fixes:

  a) a wrong version of Perl could be lifted for the installer;

  b) an embarassing misprint leading to a segfault;

Enjoy,
Ilya

--- ./os2/Makefile.SHs-pre  Tue May  8 02:27:22 2001
+++ ./os2/Makefile.SHs  Tue May  8 02:55:12 2001
@@ -154,8 +154,8 @@ perl_sys: $ perlmain$(OBJ_EXT) $(LIBPER
$(SHRPENV) $(CC) $(SYS_CLDFLAGS) $(CCDLFLAGS) -o perl_sys perlmain$(OBJ_EXT) 
$(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs)
 
 installcmd : 
-   perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq 
' $(INSTALLCMDDIR)
-   perl os2/perl2cmd.pl $(INSTALLCMDDIR)
+   @perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq 
+' $(INSTALLCMDDIR)
+   ./miniperl -Ilib os2/perl2cmd.pl $(INSTALLCMDDIR)
 
 # Aout section:
 
--- ./os2/os2.c-pre-fcn Tue May  8 02:27:22 2001
+++ ./os2/os2.c Wed May  9 03:07:38 2001
@@ -203,18 +203,15 @@ loadByOrd(char *modname, ULONG ord)
 {
 if (ExtFCN[ord] == NULL) {
static HMODULE hdosc = 0;
-   BYTE buf[20];
-   PFN fcn;
+   PFN fcn = (PFN)-1;
APIRET rc;
 
-   
-   if (!hdosc) {
+   if (!hdosc)
hdosc = loadModule(modname);
-   if (CheckOSError(DosQueryProcAddr(hdosc, loadOrd[ord], NULL, fcn)))
-   Perl_croak_nocontext(
+   if (CheckOSError(DosQueryProcAddr(hdosc, loadOrd[ord], NULL, fcn)))
+   Perl_croak_nocontext(
This version of OS/2 does not support %s.%i, 
modname, loadOrd[ord]); 
-   }
ExtFCN[ord] = fcn;
 } 
 if ((long)ExtFCN[ord] == -1) 

- End forwarded message -



Re: O'Reilly Safari - anyone use it?

2001-05-19 Thread Nathan Torkington

Robin Houston writes:
 On Fri, May 18, 2001 at 11:30:28PM +0100, Barry Pretsell wrote:
  It sounds like a good idea (must be better than having 3 editions
  of Programming Perl) and I'm tempted to give it a go, so any Safari
  subscribers out there with an opinion?
 
 Don't forget the ever-fabulous http://corvin.spb.ru/

You know, I've checked my royalty statement for the Cookbook, and nary
a penny came from this Russian pirate website.  The point of Safari is
that you pay a very small amount of money for very convenient access,
and the author gets some of it (I believe authors get a greater
royalty via Safari than they do via printed books, because we don't
have printing costs).

When you don't pay money, whether you justify it because you already
own the book, or because you're a poor student, you're screwing the
authors.  But they won't miss my $1.  Your dollar is no different
from everyone else's, and if everyone else thought the same thing,
there'd be no dollars.

Who here has written a book?  Simon and Dave at least.  It's not easy,
is it?  It's an exercise in MISERY.  Huge numbers of lost evenings,
missed family moments, and late nights.  When I was writing the Perl
Cookbook, I had to miss a family trip to Disneyworld and a rare
talk.bizarre party in Montreal because of book deadlines.  If there's
nothing waiting at the end but your name on a book nobody buys because
some assface in Russia offers it up for free on the web, I sure as
hell wouldn't have done it.  I'd have had fun with my family and
friends, enjoyed those evenings, and spent a hell of a lot less time
worrying about the placement of commas and the difference between
which and that.

So thanks for the pointer to your ever-fabulous Russian thief, but my
son would really prefer that you tried Safari.

Thanks,

Nat





Re: O'Reilly Safari - anyone use it?

2001-05-19 Thread Rob Partington

In message [EMAIL PROTECTED],
Nathan Torkington [EMAIL PROTECTED] writes:
 When you don't pay money, whether you justify it because you already
 own the book, or because you're a poor student, you're screwing the
 authors.  But they won't miss my $1.  Your dollar is no different
 from everyone else's, and if everyone else thought the same thing,
 there'd be no dollars.

I don't think that's necessarily true.  Dave Thomas and Andy Hunt gave
away their Programming Ruby book by putting it online so you can read
it without pirating it or paying for it.  

I know 3 people, me included, who went a bought a second copy of the book
when they did that.  I know people who have bought the book after reading
it on the Ruby website.  

If I had a need for the Cookbook, I'd buy a dead tree copy whether it 
was freely pirated online or not -- I can't get online in the bath, 
or on a train, or in a car, so online copies are relatively useless.
-- 
rob partington % [EMAIL PROTECTED] % http://lynx.browser.org/
(just 2p worth)



Re: O'Reilly Safari - anyone use it?

2001-05-19 Thread Dean S Wilson





-Original Message-From: 
Barry Pretsell [EMAIL PROTECTED]
I'm interested to know if anyone uses 
Safari to read O'Reilly books online.
http://safari1.oreilly.com/tablhom.asp?home

It sounds like a good idea (must be better 
than having 3 editions of Programming Perl) and I'm tempted to give it a go, 
so any Safari subscribers out there with an opinion?

I've not started using it yet but I'll admit 
to being very tempted on a couple of occasions (When I need the cookbook and 
my CD's at home mostly) the only real thing putting me off is the need to be 
constantly on-line. I do a lot of my work on my laptop with no network 
connections so I don't get distracted by things like e-mail and I'd like a 
local copy, you could write a slow crawler to make up for this but that 
sorta breaks the spirit of it and I imagine Nat not being too happy with me 
;)

I was impressed by the Manning way of 
letting me download a PDF of the book, it makes my life easier since I can 
use it off line. On the other hand I thought Manning would have released 
their back catalogue in ebook as well as they have a very limited selection 
at the moment.

I suppose the issue with books as PDF is that it leaves 
you wide open to rampant copying... Although you could slow crawl safari and 
zip 'em up.

 Dean
-- 
Profanity is the one language all programmers 
understand. --- Anon


Sara Cox - was Re: FHM Top 100 Sexiest Women

2001-05-19 Thread James Powell

On Sun, May 20, 2001 at 12:00:38AM +0100, Piers Cawley wrote:
 Neil Ford [EMAIL PROTECTED] writes:
 
  Just picked up the latest FHM to check out the above mentioned list...
  
  The interesting bits are as follows;
 
 The really interesting bit was Mr Ford dancing around in his living
 room crowing because Sara Cox had read his name out on the radio. 
 

Ahh Sara Cox - as deserving of her position in the FHM top 100 women
as she is of her £750K out of the license fee for two years blathering.


jp