Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Quick way to set up columns with Class::DBI ?

by siracusa (Friar)
on Aug 19, 2006 at 03:11 UTC ( [id://568304]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Quick way to set up columns with Class::DBI ?
in thread Quick way to set up columns with Class::DBI ?

My objective is to create some generic routines that will simply generate web forms that will allow me to BREAD several disparate databases of mine. Does Rose sound good for this?

It sure does :) Take a look at Rose::HTML::Objects as well for the form generation. It's pretty easy to auto-generate both things: the RDBO classes from the database (with the Loader/auto_initialize) and then auto-generate the HTML forms using something like what's described in this mailing list post. (Hop on the mailing lists for Rose::DB::Object and Rose::HTML::Objects if you have any questions.)

(Whoops, link corrected.)

Replies are listed 'Best First'.
Re^4: Quick way to set up columns with Class::DBI ?
by jfrm (Monk) on Aug 19, 2006 at 07:06 UTC
    Ooh. Ooh. Thanks. Yes, I do like the objects thing.

    Yes I already saw that it has a thriving and responsive community. I will start worshipping at the temple of the Rose. It has to be better than Class::DBI for starters because that refuses to install!<br
Re^4: Quick way to set up columns with Class::DBI ?
by jfrm (Monk) on Aug 21, 2006 at 12:13 UTC
    Well I have to admit to be slightly disappointed. I have knocked on the door of the Rose::DB temple but it wasn't open. I did try to sneak in through a side door but the inner sanctum was locked... Or put another way, I have tried for quite some time now to install the Rose stuff; overcame a couple of problems but can't afford to spend more time, really. However, I would like to help so am offering this as a point of feedback more than anything else.

    First off, I tried PPM but Rose isn't in the AS repository (I'm beginning to see that I should regard this as a very bad omen because whenever a package isn't there, only rarely can i manage to install it via any other method....)

    Then I tried CPAN which fails because Datetime doesn't install due to a win32 buglet in the infinite tests. I did eventually get over this hurdle - the bug seems to be well known and apparently ignorable so I installed Datetime manually and then went back and tried to CPAN Rose again (I wasn't entirely sure if this was the right approach but it did seem to get further so I think it must have been). But then CPAN/Rose first told me that I needed to set environment variables allow connection to the DB in order to complete the tests but also said that if they weren't set the tests would be ignored. Unfortunately the tests didn't seem to work. Here is the output:

    t\00-warning.......................ok t\bind-param.......................Can't locate Rose/DB.pm in @INC (@I +NC contains: C:\.cpan\build\Rose-DB-Object-0.75\blib\lib C:\.cpan\bui +ld\Rose-DB-Objec t-0.75\blib\arch C:/PERL/lib C:/PERL/site/lib . C:/PERL/lib C:/PERL/si +te/lib .) at t/test-lib.pl line 7. BEGIN failed--compilation aborted at t/test-lib.pl line 7. Compilation failed in require at t\bind-param.t line 9. BEGIN failed--compilation aborted at t\bind-param.t line 11. t\bind-param.......................dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-27 Failed 27/27 tests, 0.00% okay t\column-triggers..................Can't locate Rose/DB.pm in @INC (@I +NC contains: C:\.cpan\build\Rose-DB-Object-0.75\blib\lib C:\.cpan\bui +ld\Rose-DB-Objec t-0.75\blib\arch C:/PERL/lib C:/PERL/site/lib . C:/PERL/lib C:/PERL/si +te/lib .) at t/test-lib.pl line 7. BEGIN failed--compilation aborted at t/test-lib.pl line 7. Compilation failed in require at t\column-triggers.t line 9. BEGIN failed--compilation aborted at t\column-triggers.t line 13. t\column-triggers..................dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-259 Failed 259/259 tests, 0.00% okay t\db-migration.....................Can't locate Rose/DB.pm in @INC (@I +NC contains: C:\.cpan\build\Rose-DB-Object-0.75\blib\lib C:\.cpan\bui +ld\Rose-DB-Objec t-0.75\blib\arch C:/PERL/lib C:/PERL/site/lib . C:/PERL/lib C:/PERL/si +te/lib .) at t/test-lib.pl line 7. BEGIN failed--compilation aborted at t/test-lib.pl line 7. Compilation failed in require at t\db-migration.t line 9. BEGIN failed--compilation aborted at t\db-migration.t line 11. t\db-migration.....................dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-33 Failed 33/33 tests, 0.00% okay t\db-object-auto...................Can't locate Rose/DB.pm in @INC (@I +NC contains: C:\.cpan\build\Rose-DB-Object-0.75\blib\lib C:\.cpan\bui +ld\Rose-DB-Objec t-0.75\blib\arch C:/PERL/lib C:/PERL/site/lib . C:/PERL/lib C:/PERL/si +te/lib .) at t/test-lib.pl line 7. BEGIN failed--compilation aborted at t/test-lib.pl line 7. Compilation failed in require at t\db-object-auto.t line 9. BEGIN failed--compilation aborted at t\db-object-auto.t line 12. t\db-object-auto...................dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-266 Failed 266/266 tests, 0.00% okay
    --snip-- and so it goes on... --snip--
    Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-7 Failed 7/7 tests, 0.00% okay t\spot-check-09....................Can't locate Rose/DB.pm in @INC (@I +NC contains: C:\.cpan\build\Rose-DB-Object-0.75\blib\lib C:\.cpan\bui +ld\Rose-DB-Objec t-0.75\blib\arch C:/PERL/lib C:/PERL/site/lib . C:/PERL/lib C:/PERL/si +te/lib .) at t/test-lib.pl line 7. BEGIN failed--compilation aborted at t/test-lib.pl line 7. Compilation failed in require at t\spot-check-09.t line 9. BEGIN failed--compilation aborted at t\spot-check-09.t line 11. t\spot-check-09....................dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-13 Failed 13/13 tests, 0.00% okay Failed Test Stat Wstat Total Fail List of Faile +d ---------------------------------------------------------------------- +--------- t\bind-param.t 2 512 27 54 1-27 t\column-triggers.t 2 512 259 518 1-259 t\db-migration.t 2 512 33 66 1-33 t\db-object-auto.t 2 512 266 532 1-266 t\db-object-cached.t 2 512 415 830 1-415 t\db-object-changes-only-1.t 2 512 483 966 1-483 t\db-object-changes-only-2.t 2 512 286 572 1-286 t\db-object-convention.t 2 512 159 318 1-159 t\db-object-foreign-key-auto.t 2 512 261 522 1-261 t\db-object-foreign-key.t 2 512 196 392 1-196 t\db-object-helpers.t 2 512 298 596 1-298 t\db-object-loader-2.t 2 512 86 172 1-86 t\db-object-loader-3.t 2 512 61 122 1-61 t\db-object-loader-4.t 2 512 86 172 1-86 t\db-object-loader-5.t 2 512 101 202 1-101 t\db-object-loader-6.t 2 512 96 192 1-96 t\db-object-loader.t 2 512 120 240 1-120 t\db-object-manager-bulk-ops.t 2 512 218 436 1-218 t\db-object-manager.t 2 512 2939 5878 1-2939 t\db-object-mapper.t 2 512 315 630 1-315 t\db-object-metadata.t 2 512 28 56 1-28 t\db-object-relationship-auto-2.t 2 512 92 184 1-92 t\db-object-relationship-auto.t 2 512 92 184 1-92 t\db-object-relationship.t 2 512 1478 2956 1-1478 t\db-object-std-cached.t 2 512 241 482 1-241 t\db-object-std.t 2 512 185 370 1-185 t\db-object.t 2 512 468 936 1-468 t\deep-joins.t 2 512 1496 2992 1-1496 t\inheritance.t 2 512 55 110 1-55 t\lazy-columns.t 2 512 80 160 1-80 t\make-modules.t 2 512 ?? ?? ?? t\makemethods-db.t 2 512 51 102 1-51 t\makemethods.t 2 512 125 250 1-125 t\multi-pk-sequences.t 2 512 50 100 1-50 t\query-builder.t 2 512 2 4 1-2 t\save-cascade.t 2 512 89 178 1-89 t\schema-override.t 2 512 8 16 1-8 t\spot-check-01.t 2 512 82 164 1-82 t\spot-check-02.t 2 512 32 64 1-32 t\spot-check-03.t 255 65280 4 7 1-4 t\spot-check-04.t 2 512 6 12 1-6 t\spot-check-05.t 2 512 3 6 1-3 t\spot-check-06.t 2 512 5 10 1-5 t\spot-check-07.t 2 512 4 8 1-4 t\spot-check-08.t 2 512 7 14 1-7 t\spot-check-09.t 2 512 13 26 1-13 1 test skipped. Failed 46/48 test scripts. 11401/11402 subtests failed. Files=48, Tests=11402, 21 wallclock secs ( 0.00 cusr + 0.00 csys = 0 +.00 CPU) Failed 46/48 test programs. 11401/11402 subtests failed. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x2' Stop. C:\indigoperl\bin\nmake.EXE test -- NOT OK Running make install make test had returned bad status, won't install without force
    I'm not sure if it failed due to lack of env. variables in which case instructions seemed to mislead me or otherwise. Anyway, then I was rather cheesed off and discovered that PPM installed DBIx instantly and without a murmur. So I think I'll try to pray at the DBIx temple and see if that leads me to enlightenment for now...

      You do not have to set any environment variables. They are all optional.

      The Rose:: modules are all pure-perl and do nothing fancy on test or install. As for your test failures, this line:

      "Can't locate Rose/DB.pm in @INC ..."

      Indicates to me that Rose::DB is not installed. Rose::DB is a prerequisite for Rose::DB::Object. The CPAN shell should have detected that and offered to install Rose::DB for you before attempting to install Rose::DB::Object.

      The fact that this did not (apparently) happen makes me suspicious that other prerequisites may have been missed as well. I'm not sure how this could happen, since the modules specify their prerequisites in the standard, CPAN-supported way. (Look in the "Makefile.PL" of each module to see its list of prerequisites.)

      Most big CPAN modules have prerequisites, and sometimes those prerequisites can be painful to install, especially if they have an XS component, and especially on Win32. And, of course, those prerequisites may have prerequisites, and so on.

      Among ORMs, some prerequisites are common. For example, DateTime is used by many ORMs to abstract dates. Installing other ORMs may be a bit easier now that you've already done some of the work, but each ORM will have its own unique prerequisites as well. If the module-dependency mechanism is not working correctly on your system, you may have problems installing any non-trivial CPAN modules. But remember that you can always install prerequisites manually, if necessary.

        OK, thanks once again for your extremely prompt help. I am happy to keep plugging away for now. It's very frustrating but I do take your point on prereqs etc. I've tried to install Rose::DB and I think this is the problem. I don't have a compiler, I don't think. Have done a bit of searching but can't find anything pertinent. This has me beat at the moment so any pointers gratefully received.

        (also I struggle to see the remotest reason why I might need anything to do with a TTY for my application but there you are...)
        Warning: prerequisite IO::Tty 0 not found. Writing Makefile for junoscript-perl ---- Unsatisfied dependencies detected during [J/JU/JUNOS/junoscript-p +erl-6.4I0.tar.gz] ----- IO::Tty Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] Running make test Delayed until after prerequisites Running make install Delayed until after prerequisites Running install for module IO::Tty Running make for R/RG/RGIERSIG/IO-Tty-1.07.tar.gz Checksum for \.cpan\sources\authors\id\R\RG\RGIERSIG\IO-Tty-1.07.tar.g +z ok IO-Tty-1.07/ IO-Tty-1.07/ChangeLog IO-Tty-1.07/Makefile.PL IO-Tty-1.07/MANIFEST IO-Tty-1.07/META.yml IO-Tty-1.07/Pty.pm IO-Tty-1.07/README IO-Tty-1.07/test.pl IO-Tty-1.07/try IO-Tty-1.07/Tty.pm IO-Tty-1.07/Tty.xs CPAN.pm: Going to build R/RG/RGIERSIG/IO-Tty-1.07.tar.gz Now let's see what we can find out about your system (logfiles of failing tests are available in the conf/ dir)... ERROR: cannot run the configured compiler 'cl' (see conf/compilerok.log). Suggestions: 1) The complier 'cl' is not in your PATH. Add it to the PATH and try again. OR 2) The compiler isn't installed on your system. Install it. OR 3) You only have a different compiler installed (e.g. 'gcc'). Either fix the compiler config in the perl Config.pm or install a perl that was built with the right compiler (you could build perl yourself with the available compiler). Note: this is a system-administration issue, please ask your local admin for help. Thank you. Running make test Make had some problems, maybe interrupted? Won't test Running make install Make had some problems, maybe interrupted? Won't install

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://568304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-28 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found