Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

setting up SQL-Translator help

by spx2 (Chaplain)
on Jun 30, 2007 at 21:38 UTC ( #624246=perlquestion: print w/ replies, xml ) Need Help??
spx2 has asked for the wisdom of the Perl Monks concerning the following question:

hi,i tried using on windows DBIx::Class but when i make a script called deploy wich is supposed to create the tables

the script:
use DB::Main; $dbh = DB::Main->connect('dbi:SQLite:t\var\database.db'); $dbh->deploy;

so i run the code and i get something very nasty on windows with activestate like SQL::Translator version 0.08 needed,you have only version 0.07

http://search.cpan.org/dist/SQL-Translator/ this is the link to where one could get 0.08 version how do i set it up ?

Comment on setting up SQL-Translator help
Download Code
Re: setting up SQL-Translator help
by bart (Canon) on Jun 30, 2007 at 21:46 UTC
    If "on Windows" means using ActiveState's ActivePerl, then I think it's best to try to install it with PPM. Just open a cmd window (AKA a "DOS box"), type ppm, and at the prompt that appears there, type "install SQL::Translator".

    For pure perl modules not on these repositories, you can try the CPAN shell (type "CPAN" or "perl -MCPAN -e shell" at the DOS prompt), but you need to install a make utility first (Microsoft's nmake will do fine for most purposes) and there is, if nothing changed, quite a large questionnaire to wade through the first time you use it. Again, when it's set up, type "install SQL::Translator" at the prompt.

    Whoops, the PPM shell just came back and told me it couldn't find any more recent version of SQL::Translator than 0.07; I guess you'll be forced to jump through the CPAN.pm hoops. (the second approach).

    There are good nodes out there with tutorials on how to install modules, but the outline is what I gave here.

      thank you for the methods described. ive aknowledged my "mistake" of installing DBIx::Class from cpan and ive got some errors i believe and it didnt let me install SQL::Translator because it failed some tests,so i decided to install SQL::Translator from cpan ,and it gave me lots of errors and dependencies(i dont understand why it doesnt know how to treat dependencies automatically) so i said ... fuck ill install it from ppm. so i tried what i said in the previous posts.

      then i figgured that people at ppm made their repo so that even tough they dont have the newest stuff,it is all compatible, and i also saw that ppm is better than cpan because it solves dependencies automatically and that solved my problem.

      i have also some unconfirmed hunch: cpan uses mingw to compile some stuff when it installs some packages. and some questions: are there automated,nice ways of installing the newest packages on windows ?

        CPAN can be configured to auto-follow dependencies, ask you, or skip them. It sounds like yours is set for the latter - you can change it as follows from inside the CPAN program (the second line makes the change permanent):

        o conf prerequisites_policy follow o conf commit

        That said, that won't get around the lack of a default compiler on Windows. If you have one, A Practical Guide to Compiling C based Modules under ActiveState using Microsoft C++ and its subsequent comments are a good guide. Strawberry Perl is also worth a look at (though be aware of the 'alpha release' note):

        Strawberry Perl is part of the Vanilla Perl Project to provide a binary distribution of Perl for the Windows operating system. It includes a bundled compiler and pre-installed modules that offer the ability to install XS CPAN modules directly from CPAN. The purpose of the Strawberry Perl series is to provide a practical Win32 Perl environment for experienced Perl developers to experiment with and test the installation of various CPAN modules under Win32 conditions, and to provide a useful platform for doing real work.

        Hope that helps.

Re: setting up SQL-Translator help
by randyk (Parson) on Jul 01, 2007 at 15:13 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://624246]
Approved by bart
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (14)
As of 2014-10-30 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls