in reply to How to implement something similar to Unix's find syntax?

File::Find::Rule might be of interest to you. If your 'objects' were YAML files, for example.. Well. You can imagine from there. It could be slow loading those.

The other option is a database. MySQL is fast at select queries and slow on inserts, as compared to sqlite, driver for DBI, which is slow at selects and fast on inserts. In my experience (doing millions of small inserts very quickly).

If you want to use a database I would suggest go with sqlite, if you use the cpan DBI driver, it's self contained- that is- you just install that. No need for a server daemon ( like with mysql)- later if you want- you can change to mysql without messing your code too much.

It could help to be more specific.. objects? OO, or .. an abstract idea of "objects"?

  • Comment on Re: How to implement something similar to Unix's find syntax?

Replies are listed 'Best First'.
Re^2: How to implement something similar to Unix's find syntax?
by bart (Canon) on May 26, 2007 at 10:09 UTC
    as compared to sqlite, driver for DBI, which is slow at selects and fast on inserts
    WTF. That's not what other people have reported. (Though it probably can be faster at inserts if you do it properly.)
Re^2: How to implement something similar to Unix's find syntax?
by dgaramond2 (Monk) on May 26, 2007 at 00:14 UTC
    The objects are ordinary Perl objects (well, unblessed hashes, actually, and yes they are loaded from YAML files). But the objects are not the issue. As others have guessed, I am (or will be used to, hopefully) absolutely clueless in parsers and compilers.