Prev: FAQ 8.21 Where do I get the include files to do ioctl() or syscall()?
Next: FAQ 5.10 How can I set up a footer format to be used with write()?
From: Uri Guttman on 10 Mar 2010 12:06 >>>>> "LE" == Lars Eighner <usenet(a)larseighner.com> writes: >> There are lots of CPAN entries for database stuff. What have you found? LE> More than 1100 entries, but a many of the as I have inspected seem LE> to involve minus greater-than notation. As I said, I am looking LE> for a function-type database interface. why do you care about this? it isn't called 'minus greater-than notation' but OO. it is actually EASIER to use oo for this than procedural. and DBI is the standard interface to dozens of db systems so you can actually switch to another (if your sql is portable enough). your request makes little sense for that reason. and there is a module out there that will wrap an OO module into a procedural one (it assumes a default object for it). you can easily use it (i need to find it, i do think i know the author) or write your own. just allocate a singleton object in a lexical and all your procedural wrapper subs use it to make the OO calls. you save on passing the object and the dreaded -> notation but you lose on everything else. uri -- Uri Guttman ------ uri(a)stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
From: Dr.Ruud on 10 Mar 2010 15:28 Lars Eighner wrote: > More than 1100 entries, but a many of the as I have inspected seem to > involve minus greater-than notation. As I said, I am looking for a > function-type database interface. But why? It is easy to abstract away yourself though. Or see DBIx::Perlish. -- Ruud
From: Uri Guttman on 15 Mar 2010 16:21
>>>>> "LE" == Lars Eighner <usenet(a)larseighner.com> writes: LE> I'm still looking for a function-type database interface. CPAN LE> returns more than 1100 hits for mysql, but if there is a function LE> interface, I haven't found it. i still say learning OO perl is easy enough and you should learn it. saying pointy ops are hard is a barbie excuse. but if you MUST have a procedural API (functional is the wrong term), check out Sub::Exporter on cpan. it can create a procedural API from an OO one and manage a singleton object for you. you still need to do some work (if you can handle it) to create your own api. this a fool's errand you are on anyhow but i had to mention this module. uri -- Uri Guttman ------ uri(a)stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- |