Changeset 841


Ignore:
Timestamp:
04/28/22 16:47:20 (2 years ago)
Author:
Kris Deugau
Message:

/trunk

Update textrecs.cgi include path finder - see #80

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/textrecs.cgi

    r797 r841  
    33##
    44# $Id$
    5 # Copyright 2012-2014,2020 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2012-2014,2020,2022 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    2828use DBI;
    2929
    30 # push "the directory the script is in" into @INC
    31 use FindBin;
    32 use lib "$FindBin::RealBin/";
     30# Taint-safe (ish) voodoo to push "the directory the script is in" into @INC.
     31use File::Spec ();
     32use File::Basename ();
     33my $path;
     34BEGIN {
     35    $path = File::Basename::dirname(File::Spec->rel2abs($0));
     36    if ($path =~ /(.*)/) {
     37        $path = $1;
     38    }
     39}
     40use lib $path;
    3341
    3442use DNSDB;
Note: See TracChangeset for help on using the changeset viewer.