| 1) Matt S Trout Re: syntax for macros / function composition at compile time |
|
|
| That's not what attributes do though, they call a class method at a random point when the sub... |
|
|
|
|
|
|
|
On Thu, Nov 06, 2008 at 04:59:41AM -0800, Michael G Schwern wrote: > I still say subroutine attributes are the way. That's the syntax for> attaching things to a subroutine in Perl 5. I'd make a decorate() attribute> and pass it the decorators.That's not what attributes do though, they call a class method at a random point when the sub doesn't have a name yet and then you do a crazy dance to try and do something useful with them. We hates attributes, we do. > sub incr : decorate(memoize, log($file)) {> $_[0] + 1;> }Meh. How about memoized logged (to => $file) sub incr (Int $i) { $i + 1; } ? We can certainly decorate 'method' like that. Not sure if it's possible with sub; when rafl took over trying to make sub signatures work I kind of forgot most of what little I'd worked out about how 'sub' is parsed in statement form. Better still, how about we shift off to the perl5-syntax list and stop bothering p5p until we have something worth shoving into core? :)
|
|
|
| 2) Matt S Trout [Dbix-class] Patch roundup time, again. |
|
|
| Other than the bigass diff to sqlite.sql, is there anything left to do here? If not, lob me an... |
|
|
|
|
|
|
|
On Mon, Oct 06, 2008 at 12:10:42AM +0200, Jens Gassmann wrote: > Hi, > > >Any outstanding patches, please send to this thread. Can somebody also > >go through rt.cpan.org and work out if there's anything on there we need > >to apply as well? > > attached the test and patch for DBIx::Class::InflateColumn::Datetime
Other than the bigass diff to sqlite.sql, is there anything left to do here? If not, lob me an htpasswd line and I'll set you up to commit this. > The recreation of the test-schema generates many changes - many more > then my :-(Diffs against sqlite.sql are irrelevant - the only reason it's in svn at all is for the (now vanishingly small) number of people patching DBIC who don't have SQL::Translator. Might actually just have Makefile.PL create it and drop the damn thing from svn entirely - thoughts people?
|
|
|
| 3) Matt S Trout [Dbix-class] Probleme with nextval() and postgresql 7.4.17 |
|
|
| DBIC_TRACE=1 perl myscript.pl and see what queries you're running. Also please note it's... |
|
|
|
|
|
|
|
On Tue, Oct 07, 2008 at 10:54:30AM +0200, Ludovic Legrand wrote: > hi, > I want to select the nextval of the sequence 'seq_id_comparison' of the > table 'Comparison' with this line: > > $dbh->resultset('Comparison')->search(undef, { > select => "nextval('seq_id_comparison')", > as => 'id_comp', > })->single->get_column('id_comp'); > SQL equivalent: > SELECT NEXTVAL('seq_id_comparison'); > > The SQL statement gives last_value + 1, that's ok, while the DBIx > request gives something like last_value + 500 ... > How to explain this increment ?
DBIC_TRACE=1 perl myscript.pl and see what queries you're running. Also please note it's DBIx::Class or DBIC, DBIx:: contains lots of other projects.
|
|
|
| 4) Matt S Trout [Dbix-class] install test failures |
|
|
| If you can send a patch to the roundup thread I'm sure somebody will apply it. There's no point in... |
|
|
|
|
|
|
|
On Tue, Oct 07, 2008 at 11:57:56AM +0100, Dave Howorth wrote: > Dave Howorth wrote: > > Can anybody help me track down my test failures, please? > > > > Hopefully it's me being silly but if not, I'd like to make an RT report > > before release. > > OK, I've tracked down the problem with t/61findnot.t and raised an RT > report for it. The issue is that it has an undeclared dependency on > having a recent version of Test::Warn.
If you can send a patch to the roundup thread I'm sure somebody will apply it. There's no point in submitting to RT, it just generates extra work.
|
|
|
| 5) Matt S Trout [Dbix-class] Patch roundup time, again. |
|
|
| last_insert_rowid is a sqliteism I put in in the very early days, expecting it to go away by like... |
|
|
|
|
|
|
|
On Sun, Oct 05, 2008 at 02:43:21PM -0700, Marc Mims wrote: > * Matt S Trout <dbix-class@trout.me.uk> [081005 14:30]: > > Can somebody also go through rt.cpan.org and work out if there's > > anything on there we need to apply as well? > > I can provide a patch to close RT #21260: Problem with last_insert_rowid: > http://lists.scsys.co.uk/pipermail/dbix-class/2008-October/006843.html > > I would do so by adding a warning to _rebless if the backend can't be > determined or if there is no DBIC extension for it then punting with a > DBI call to last_insert_id, passing the table and column.
last_insert_rowid is a sqliteism I put in in the very early days, expecting it to go away by like 0.03. last_insert_id is the DBI standard, which theoretically should just work. Just commit the damn fix.
|
|
|
| 6) Matt S Trout [Dbix-class] DBIx::Class or others for procedural backend |
|
|
| DBIx::Class is designed from te ground up to let you use the full power of your database. This... |
|
|
|
|
|
|
|
On Sun, Oct 05, 2008 at 02:11:07PM -0700, Christopher Greenwood wrote: > I've been using dbix::class for a few projects and its great for simple > CRUD but now I'm working on migrating a piece of our ERP system into a > web based platform and the backend is oracle where a lot of the CRUD and > data validation is written in PLSQL. What's the best module out there > for the ORM layer in this instance or am I stuck with creating complex > classes in DBIx::Class? Appreciate any feedback.
DBIx::Class is designed from te ground up to let you use the full power of your database. This includes complex reporting queries that would have to be views in any other perl ORM. This also includes calling stored procedures. We gained DB2 on AS/400 support because somebody was using that with a DB that was 99% sprocs and it worked for him. Have a read through the cookbook, then if you still feel you're "stuck with creating complex classes" we'll be happy to help you make it simpler. And remember the golden rule: willingness to supply failing tests and/or documentation patches buys you a -lot- of stupid question credits.
|
|
|
| 7) Matt S Trout [Catalyst] Success stories please |
|
|
| Or add it to catalystsites.org or something ... |
|
|
|
|
|
|
|
On Sun, Oct 05, 2008 at 03:08:22PM -0600, Devin Austin wrote: > http://yourspace.codedright.netOn the blog dammit! Or add it to catalystsites.org or something ...
|
|
|
| 8) Matt S Trout [Dbix-class] Patch roundup time, again. |
|
|
| Trunk works. It's almost time to start the release cycle. I -know- that due to fighting the... |
|
|
|
|
|
|
|
Trunk works. It's almost time to start the release cycle. I -know- that due to fighting the multi-create and new_related stuff, I've dropped patches people have sent. I know that's my fault. I'm still going to make you guys re-send them :) Any outstanding patches, please send to this thread. Can somebody also go through rt.cpan.org and work out if there's anything on there we need to apply as well? Also, can somebody poke at the views branch and get it pulled from trunk so we can merge that please? groditi doesn't have time and I'm not sure I can get to it soon enough.
|
|
|
| 9) Matt S Trout [Catalyst] Success stories please |
|
|
| http://perlbuzz.com/2008/10/whats-the-state-of-perl-web-frameworks.html Shout out your support... |
|
|
|
|
|
|
|
http://perlbuzz.com/2008/10/whats-the-state-of-perl-web-frameworks.htmlShout out your support please, let's show the wider world that we're -the- real MVC option right now. And be honest - I don't think anybody thinks the docs are perfect or the learning curve's as shallow as it could be, but that doesn't mean Catalyst isn't still awesome.
|
|
|
| 10) Matt S Trout [Dbix-class] DBIx::Class and Red Hat perl bugs and performance redux |
|
|
| Oh, we could fail tests, yes. But we were hoping not to do that. Possibly we could check if we can... |
|
|
|
|
|
|
|
On Sun, Oct 05, 2008 at 04:16:32PM +0100, Nigel Metheringham wrote: > > On 5 Oct 2008, at 12:00, Matt S Trout wrote: > > >On Thu, Oct 02, 2008 at 02:34:10PM +0100, Nigel Metheringham wrote: > >>DBIx::Class::StartupCheck > >>------------------------- > >> > >>Both old and new perls trigger the startup check - as will any perl > >>with > >>the fixes to bless/overload bugs that is less than version 5.8.9. > >>Other > >>than doing performance checks, which would be prohibitively cpu > >>intensive, I cannot think of a method for identifying this problem in > >>the startup check code without hitting a lot of false positives. I > >>see > >>that this code is patched out in rpm distributions of DBIx::Class. > >>I am > >>wondering if the checks have now outlived their usefulness, at > >>least as > >>a by default option. Maybe they should be added to the test suite > >>instead. > > > >Nobody will see the warning then. > > A run time check of this type is realistically only aiming at those > using a system perl and their own cpan install - and you would hope > that those people would at least look at any test suite failures on > install.
Oh, we could fail tests, yes. But we were hoping not to do that. Possibly we could check if we can prompt() and let people hit y<enter> to make the test pass if they really want it to? Hmm. Or do the prompt at Makefile.PL time would probably be nicer. We could even write Module::Install::RedHatBug ... > Unfortunately I don't think there is anything I can identify in perl - > V which acts as a differentiator. There is definitely no patch > information in the output for the rpm built perls, so everything ends > up being hopeful guesswork.Er. There really should be something in registered patches. I could've sworn that they usually did show that. If not then I think the prompt approach is probably the least unsane, unless anybody has a better idea ...
|
|
|
| 11) Matt S Trout [Dbix-class] DBIx::Class and Red Hat perl bugs and performance redux |
|
|
| Nobody will see the warning then. I think the correct approach is probably to identify what in... |
|
|
|
|
|
|
|
On Thu, Oct 02, 2008 at 02:34:10PM +0100, Nigel Metheringham wrote: > DBIx::Class::StartupCheck > ------------------------- > > Both old and new perls trigger the startup check - as will any perl with > the fixes to bless/overload bugs that is less than version 5.8.9. Other > than doing performance checks, which would be prohibitively cpu > intensive, I cannot think of a method for identifying this problem in > the startup check code without hitting a lot of false positives. I see > that this code is patched out in rpm distributions of DBIx::Class. I am > wondering if the checks have now outlived their usefulness, at least as > a by default option. Maybe they should be added to the test suite > instead.
Nobody will see the warning then. I think the correct approach is probably to identify what in "perl -V" output indicates a fixed perl as opposed to a broken one, and provide that in the warning so people know when it's safe to set the env var.
|
|
|
| 12) Matt S Trout [Dbix-class] Prefetch problem |
|
|
| Where are my failing tests for that? :) |
|
|
|
|
|
|
|
On Thu, Oct 02, 2008 at 04:50:23PM +0100, [email protected: p...@dragonstaff.com] wrote: > In theory you can set quoting on table and field names:> http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Manual/Cookbook.pod#Setting_quoting_for_the_generated_SQL.> > In practice, though, that doesn't work 100% on DBs like OracleWhere are my failing tests for that? :)
|
|
|
| 13) Matt S Trout [Dbix-class] Prefetch problem |
|
|
| Stick { quote_char => '`' } in connect_info |
|
|
|
|
|
|
|
On Thu, Oct 02, 2008 at 10:10:31AM -0400, Jesse Sheidlower wrote: > On Thu, Oct 02, 2008 at 08:38:41AM +0200, Matthias Zeichmann wrote: > > On Thu, Oct 2, 2008 at 04:14, Jesse Sheidlower <jester@panix.com> wrote: > > > SELECT me.id, me.title, me.performer_id, me.number, me.capo, me.tuning, me.tab_id, me.audio_id, me.group_id, performer.id, performer.name, group.id, group.name > > > FROM lesson me > > > JOIN performer performer ON ( performer.id = me.performer_id ) > > > JOIN lesson_group group ON ( group.id = me.group_id ) > > > WHERE ( ( me.id = 35 ) ) > > > ORDER BY me.title; > > > > > > This gives me the error: > > > > > > ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON ( group.id = me.group_id ) > > > WHERE ( ( me.id = 35 ) ) > > > ORDER BY me.title' at line 4 > > > > try aliasing the table to grp instead of group, my guess is that group > > is a reserved word > > Uh, yeah, that would be it. > > OK, I feel stupid, but at least in a different way from how I > thought I was being stupid ;-)
Stick { quote_char => '`' } in connect_info
|
|
|
|