in reply to MySQL and PERL

For the @INC issue just do:

use lib './'; # put current dir into @INC

For MySQL it would seem unlikely that your assignment requires a running copy of MySQL wrapped with it. This makes no sense. You can change the data path via starting mysql with --datadir=/path/to/datadir or by changing the the config options in /etc/my.cnf

[mysql.server] user=mysql basedir=/var/lib

Changing /etc/my.cnf is not going to work as this is not in your folder. Even if you could, either possible option to change the data path requires a server restart. It makes a lot more sense to use mysqldump or mysqlhotcopy to dump your DB and then just have a little shell/perl sctipt to create the DB and insert the data into a local MySQL. If you need one file stand alone functionality I sugges DBD::SQLlite is a better option.

cheers

tachyon

Replies are listed 'Best First'.
Re^2: MySQL and Perl
by Juerd (Abbot) on Jul 20, 2004 at 08:15 UTC

    From perlfaq1:

    What's the difference between "perl" and "Perl"?

    One bit. Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to signify the language proper and "perl" the implementation of it, i.e. the current interpreter. Hence Tom's quip that "Nothing but perl can parse Perl." You may or may not choose to follow this usage. For example, parallelism means "awk and perl" and "Python and Perl" look OK, while "awk and Perl" and "Python and perl" do not. But never write "PERL", because perl is not an acronym, apocryphal folklore and post-facto expansions notwithstanding.

    (my emph.)

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      Must be my Win32 background. I am not case sensitive. I find argumants about perl, PERL, Perl a waste of time. However I find the fact that anyone makes the claim that PERL does not stand for Practical Extraction and Reporting Language to be *historically inaccurate*. Download the original Perl 1 source from here Within it you can easily grep the man page which is:

      .TH PERL 1 LOCAL .SH NAME perl - Practical Extraction and Report Language .SH SYNOPSIS .B perl [options] filename args .SH DESCRIPTION .I Perl is a interpreted language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports bas +ed on that information.

      You may note that in the first 5 lines Larry himself uses PERL, perl and Perl as well as using the capitalisation Practical Extraction and Report Language.

      So call it what you want and say it means whatever you like. Does it *really* matter? Can I extract one gram worth of extra meaning from how someone capitalises pErL? OK so that looks script kiddie to me :-) Could you blame Larry for the 'confusion' by using PERL, perl, Perl, and Practical Extraction and Report Language in the first 5 lines of the original man page.

      cheers

      tachyon

        I see now that I posted the part from the FAQ as a reply to your reply, allthough it was intended as a reply to the original post. I'm sorry for any confusion that this may have caused.

        However I find the fact that anyone makes the claim that PERL does not stand for Practical Extraction and Reporting Language to be *historically inaccurate*.

        Perl is a practical extraction and reporting language. But that doesn't mean that PERL is an acronym and stands for that. It is a post-facto expansion of a non-acronym. Perl comes from Pearl, which is also not an acronym. The very manual of Perl itself is very clear that the language is Perl, and that PERL should not be written. Your Win32-background may have made you case insensitive, but Perl is not. Everything in Perl is case sensitive. Ever wondered why "use Strict;" does work, but does not do what you mean, in Win32?

        You may note that in the first 5 lines Larry himself uses PERL, perl and Perl as well as using the capitalisation Practical Extraction and Report Language.

        Not entirely true. The true source of this manual is the POD, not the manual page file itself. You'll note that in the original version, there is no PERL. Manual page names are capitalised because that is tradition. For example, the displayed name for the ls(1) manpage is LS, not ls. That does not make ls LS, or LS a valid alias for ls. In the manual, Perl and perl are often used to differentiate between the language and its implementation, a practice suggested by the FAQ I quoted. The post-facto expansion "Practical Extraction and Report Language" has uppercase letters because of an English phenomenon called titlecase. (There are probably other languages that use it as well. Dutch does not.)

        Does it *really* matter?

        To me, yes it does. To you: obviously not.

        Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }