Annotation of pandia/indexer, revision 1.1

1.1     ! snw         1: #!/usr/bin/env perl
        !             2: 
        !             3: # 
        !             4: # $Id$
        !             5: #  Copyright (C) 2025 Coherent Logic Development LLC
        !             6: #
        !             7: # Author: Serena Willis <snw@coherent-logic.com>
        !             8: #
        !             9: # Licensed AGPL-3.0
        !            10: #
        !            11: # $Log$
        !            12: #
        !            13: 
        !            14: use Getopt::Long;
        !            15: use HTTP::Tiny;
        !            16: use HTML::TreeBuilder;
        !            17: use URI;
        !            18: use DBI;
        !            19: 
        !            20: my $dbh = "";
        !            21: my $dsn = "";
        !            22: 
        !            23: print "pandia indexer v0.0.1\n";
        !            24: print " Copyright (C) 2025 Coherent Logic Development LLC\n\n";
        !            25: 
        !            26: GetOptions("dbhost=s" => \$dbhost,
        !            27:            "dbname=s" => \$dbname,
        !            28:            "dbusername=s" => \$dbusername,
        !            29:            "dbpw=s" => \$dbpw)
        !            30:     or die("error in command line arguments");
        !            31: 
        !            32: print "pandia:  connecting to $dbname database at $dbhost...";
        !            33: 
        !            34: $dsn = "DBI:mysql:database=$dbname;host=$dbhost;port=3306;mysql_connect_timeout=5;";
        !            35: $dbh = DBI->connect($dsn, $dbusername, $dbpw, {RaiseError => 0, PrintError => 0});
        !            36: die "pandia:  failed to connect to MySQL database: DBI->errstr()" unless $dbh;
        !            37: 
        !            38: print "[OK]\n";

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>