Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Suggestions for working with poor code

by knobunc (Pilgrim)
on May 10, 2001 at 18:19 UTC ( #79410=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($whatever) {
        # TODO - Finish code to take over the world
    }
    
  2. or download this
    To Do List
    Dir/file.pl 132: Finish code to take over the world
    
  3. or download this
    #/bin/sh
    
    echo 'To Do List'
    find . -type f | xargs grep -n TODO | perl -ne '($file, $line, $rest) 
    += split /:/, $_, 3; $file =~ s|^./||; $rest =~ s|.*?TODO.*?[-\s:]+||;
    + $rest =~ s|"[.;,]\s*$||; $rest =~ s|\\n||g; print "$file $line: \u$r
    +est\n"' | sort | uniq | grep -v '.#' | grep -v Makefile | grep -v CVS
    +/
    
  4. or download this
    todo:
            Tools/todo.sh
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://79410]
help
Chatterbox?
[Corion]: Meh. I have a very simple mechanism to scrape+track prices, and even to send me mail if something changes (via cron), but SQLite doesn't support window functions, so my simple SQL to determine a price change won't work :-( Maybe I should store the DB ...
[Corion]: ... in Pg, but that would mean that I'd have to deal with credentials and stuff :)
[Corion]: In fact, the whole thing is just four simple programs, one App::scrape, another being DBIx::RunSQL, and one some glue to convert a JSON object into an SQL INSERT statement (+DBI connect/execute), so it would be an incredibly simple solution...
[Corion]: ... but that simplicity falls down due to SQLite letting me down and me being too lazy to move to a real DB. Maybe DBD::CSV can handle window functions...
[hippo]: Pg has the "trust" mechanism if you don't fancy using credentials for a trivial db.
[Corion]: hippo: Oooh, that sounds quite nice - let me read the documentation on that :)
[hippo]: https://www. postgresql.org/ docs/current/ static/auth- methods.html#AUTH- TRUST
[erix]: or compile & run an instance as yourself (not user 'postgres')

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2018-02-23 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (302 votes). Check out past polls.

    Notices?