From amoore at mooresystems.com Mon Jun 8 12:56:18 2009 From: amoore at mooresystems.com (Andrew Moore) Date: Mon, 8 Jun 2009 14:56:18 -0500 Subject: [Kc] Catalyst and DBIx::Class In-Reply-To: <3B1A25C4-5F41-4FE6-9182-C0DC1A869BB6@gmail.com> References: <3B1A25C4-5F41-4FE6-9182-C0DC1A869BB6@gmail.com> Message-ID: <6c70d2980906081256x18cb4fb6s8450fe650d36e8f9@mail.gmail.com> Jonathan - Would you be willing to talk about some of this for a moment or two tomorrow evening? That's when our June meeting should be. -Andy On Mon, May 25, 2009 at 11:04 PM, Jonathan Otsuka wrote: > This weekend I started a project which needed to access its data from SQL > Server. Using the helper scripts provided from Catalyst (myapp_create.pl) > and DBIC::Schema. When running the script which was connecting over ODBC, > Result Classes (lib/MyApp/MyApp/Schema/Result/*.pm) weren't being produced. > I tried my question in #catalyst (irc.perl.org), but was told that it wasn't > the helper script so I joined #dbix-class and ask my question. I was > promptly asked questions about what the whole command I was running to try > to create the Result Classes, and possible things to try which didn't work. > Not long after, the same person asking me questions presented me with > modules files to install, once installed I was able to produce Result > Classes!!! > > I am very thankful for Caelum in #dbix-class (he is the on that helped me, > and created the modules/patches) for helping me. > > I had other issues in trying to find the correct dbi connection string for > SQL Server and ODBC. This is what I used: > > dbi:ODBC:"driver={SQL > Server};server=hostname;database=test;uid=user;pwd=password;" > > Jonathan > _______________________________________________ > kc mailing list > kc at pm.org > http://mail.pm.org/mailman/listinfo/kc > From amoore at mooresystems.com Mon Jun 8 13:04:53 2009 From: amoore at mooresystems.com (Andrew Moore) Date: Mon, 8 Jun 2009 15:04:53 -0500 Subject: [Kc] Catalyst and DBIx::Class In-Reply-To: <99dd19c90906081301v8787888obbddbc74822e0ca6@mail.gmail.com> References: <3B1A25C4-5F41-4FE6-9182-C0DC1A869BB6@gmail.com> <6c70d2980906081256x18cb4fb6s8450fe650d36e8f9@mail.gmail.com> <99dd19c90906081301v8787888obbddbc74822e0ca6@mail.gmail.com> Message-ID: <6c70d2980906081304k2dbcab5m2f63dd36982d0b20@mail.gmail.com> On Mon, Jun 8, 2009 at 3:01 PM, djgoku wrote: > On Mon, Jun 8, 2009 at 2:56 PM, Andrew Moore wrote: >> Jonathan - >> >> Would you be willing to talk about some of this for a moment or two >> tomorrow evening? That's when our June meeting should be. > > Yeah I am totally up for that. I will bring my laptop to show a demo. > > Jonathan Super! There's of course nothing fancy needed, but something to get the ball rolling for some perlish discussion would be great. Thanks! -A From amoore at mooresystems.com Mon Jun 8 13:14:07 2009 From: amoore at mooresystems.com (Andrew Moore) Date: Mon, 8 Jun 2009 15:14:07 -0500 Subject: [Kc] june meeting Message-ID: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> Hi KC PMers - Our regularly scheduled June meeting is tomorrow (Tuesday) evening at 7pm at the Barley's in Shawnee. Jonathan has agreed to talk for a few moments about his experience getting started with DBIx::Class and Catalyst. There will undoubtedly be other discussion topics, and you're encouraged to bring your own. If you are considering coming, you are encouraged (but not required) to reply so that we can keep an eye out for you and anticipate the number of chairs to grab. When you show up, we'll probably be in the back of the bar area at a high top. You can also ask for "Mr. Pearl's table" at the hostess stand and he or she will direct you to the table. I look forward to seeing you all tomorrow evening at Barley's! -Andy From davidnicol at gmail.com Mon Jun 8 14:22:46 2009 From: davidnicol at gmail.com (David Nicol) Date: Mon, 8 Jun 2009 16:22:46 -0500 Subject: [Kc] june meeting In-Reply-To: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> References: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> Message-ID: <934f64a20906081422w460cedd6uacaff814c64d63bc@mail.gmail.com> On Mon, Jun 8, 2009 at 3:14 PM, Andrew Moore wrote: > ask for "Mr. Pearl's > table" at the hostess stand Brilliant! From stephenclouse at gmail.com Mon Jun 8 15:19:12 2009 From: stephenclouse at gmail.com (Stephen Clouse) Date: Mon, 8 Jun 2009 17:19:12 -0500 Subject: [Kc] june meeting In-Reply-To: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> References: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> Message-ID: <5d0ee2170906081519k34a7a28dn3582e771b5964784@mail.gmail.com> On Mon, Jun 8, 2009 at 3:14 PM, Andrew Moore wrote: > Jonathan has agreed to talk for a few moments about his experience > getting started with DBIx::Class and Catalyst. Oh, that is some epic timing. I've spent the last three weeks learning Catalyst as part of my new job. I'll definitely join in that conversation. Catalyst is awesome, btw. One of those typical Perl things that puts everything else in its class to shame. -- Stephen Clouse -------------- next part -------------- An HTML attachment was scrubbed... URL: From djgoku at gmail.com Tue Jun 9 06:51:05 2009 From: djgoku at gmail.com (djgoku) Date: Tue, 9 Jun 2009 08:51:05 -0500 Subject: [Kc] june meeting In-Reply-To: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> References: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> Message-ID: <99dd19c90906090651o4a69ec1dw65c4d3a7b8a45691@mail.gmail.com> On Mon, Jun 8, 2009 at 3:14 PM, Andrew Moore wrote: > Hi KC PMers - > > Our regularly scheduled June meeting is tomorrow (Tuesday) evening at > 7pm at the Barley's in Shawnee. > > Jonathan has agreed to talk for a few moments about his experience > getting started with DBIx::Class and Catalyst. There will undoubtedly > be other discussion topics, and you're encouraged to bring your own. > > If you are considering coming, you are encouraged (but not required) > to reply so that we can keep an eye out for you and anticipate the > number of chairs to grab. When you show up, we'll probably be in the > back of the bar area at a high top. You can also ask for "Mr. Pearl's > table" at the hostess stand and he or she will direct you to the > table. > > I look forward to seeing you all tomorrow evening at Barley's! I just realized that I have a prior arrangement at 7:05PM tonight until around 8PM. I will be around 15 minutes from Barley's. I can make it if people are willing to wait. Let me know if you are willing to wait. Jonathan From stephenclouse at gmail.com Tue Jun 9 10:59:09 2009 From: stephenclouse at gmail.com (Stephen Clouse) Date: Tue, 9 Jun 2009 12:59:09 -0500 Subject: [Kc] june meeting In-Reply-To: <99dd19c90906090651o4a69ec1dw65c4d3a7b8a45691@mail.gmail.com> References: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> <99dd19c90906090651o4a69ec1dw65c4d3a7b8a45691@mail.gmail.com> Message-ID: <5d0ee2170906091059t7217170flc6b34fe248910f54@mail.gmail.com> On Tue, Jun 9, 2009 at 8:51 AM, djgoku wrote: > I just realized that I have a prior arrangement at 7:05PM tonight > until around 8PM. I will be around 15 minutes from Barley's. I can > make it if people are willing to wait. Let me know if you are willing > to wait. Actually, I'll be late also (have something that desperately needs to be done at about 7pm tonight), so that works for me. -- Stephen Clouse -------------- next part -------------- An HTML attachment was scrubbed... URL: From amoore at mooresystems.com Tue Jun 9 13:56:10 2009 From: amoore at mooresystems.com (Andrew Moore) Date: Tue, 9 Jun 2009 15:56:10 -0500 Subject: [Kc] june meeting In-Reply-To: <99dd19c90906090651o4a69ec1dw65c4d3a7b8a45691@mail.gmail.com> References: <6c70d2980906081314v79749c7awc8382053ccedd146@mail.gmail.com> <99dd19c90906090651o4a69ec1dw65c4d3a7b8a45691@mail.gmail.com> Message-ID: <6c70d2980906091356h3a2964f0wd499a0aa980704e7@mail.gmail.com> On Tue, Jun 9, 2009 at 8:51 AM, djgoku wrote: > I just realized that I have a prior arrangement at 7:05PM tonight > until around 8PM. I will be around 15 minutes from Barley's. I can > make it if people are willing to wait. Let me know if you are willing > to wait. I'll still try to make it over there by 7 to catch anyone who doesn't keep track of the mailing list well. I'll keep an eye out for you guys coming a bit lateish. -Andy From djgoku at gmail.com Wed Jun 10 10:15:28 2009 From: djgoku at gmail.com (Jonathan Otsuka) Date: Wed, 10 Jun 2009 12:15:28 -0500 Subject: [Kc] DBIx::Class::ResultSet / Template Toolkit / Aggregate Group By Message-ID: Catatlyst code in Controller: $c->stash->{stuff} = [ $c->model('DB::Blah')->search( {}, { select => ['data', { count => 'data' }], group_by => ['data '] } ) ]; DataDumper Info: 'MyApp::Model::DB::Blah' ), bless( { '_source_handle' => bless( { 'source_moniker' => 'Blah', 'schema' => $VAR1->[0]{'_source_handle'}{'schema'} }, 'DBIx::Class::ResultSourceHandle' ), '_in_storage' => 1, '_column_data' => { 'HASH(0x227bc00)' => '59', <--I need to access this value from the template 'data' => '1000' } }, 'MyApp::Model::DB::Blah' ), bless( { '_source_handle' => bless( { 'source_moniker' => 'Blah', 'schema' => $VAR1->[0]{'_source_handle'}{'schema'} }, 'DBIx::Class::ResultSourceHandle' ), '_in_storage' => 1, '_column_data' => { 'HASH(0x227bc00)' => '71', <--I need to access this value from the template 'data' => '2000' } Template Info: [% FOREACH s IN stuff %] [% s.data %] [% s.? %] <-- I am not sure how to access this value in the template [% END %] I can access data scalar just fine, but am not sure how to handle the HASH. Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephenclouse at gmail.com Wed Jun 10 11:39:35 2009 From: stephenclouse at gmail.com (Stephen Clouse) Date: Wed, 10 Jun 2009 13:39:35 -0500 Subject: [Kc] DBIx::Class::ResultSet / Template Toolkit / Aggregate Group By In-Reply-To: References: Message-ID: <5d0ee2170906101139g6afa205uf7ec78ab96469917@mail.gmail.com> On Wed, Jun 10, 2009 at 12:15 PM, Jonathan Otsuka wrote: > $c->stash->{stuff} = [ > $c->model('DB::Blah')->search( > {}, > { select => ['data', { count => 'data' }], group_by => ['data > '] } > ) > ]; > You want the "as" attributeon your query: $c->model('DB::Blah')->search( {}, { select => [ 'data', { count => 'data' } ], as => [ 'data', 'cnt' ], group_by => [ 'data' ], }, ); And then: $rec->data; $rec->get_column('cnt'); Note the necessity of using get_column here, since "cnt" is not an actual table column and thus won't have an auto-generated accessor method. -- Stephen Clouse -------------- next part -------------- An HTML attachment was scrubbed... URL: From djgoku at gmail.com Wed Jun 10 12:09:32 2009 From: djgoku at gmail.com (Jonathan Otsuka) Date: Wed, 10 Jun 2009 14:09:32 -0500 Subject: [Kc] DBIx::Class::ResultSet / Template Toolkit / Aggregate Group By In-Reply-To: <5d0ee2170906101139g6afa205uf7ec78ab96469917@mail.gmail.com> References: <5d0ee2170906101139g6afa205uf7ec78ab96469917@mail.gmail.com> Message-ID: <705C82FC-EEBA-4F14-B673-1A8F5D85C45F@gmail.com> On Jun 10, 2009, at 1:39 PM, Stephen Clouse wrote: > On Wed, Jun 10, 2009 at 12:15 PM, Jonathan Otsuka > wrote: > $c->stash->{stuff} = [ > $c->model('DB::Blah')->search( > {}, > { select => ['data', { count => 'data' }], group_by => > ['data '] } > ) > ]; > > You want the "as" attribute on your query: > > $c->model('DB::Blah')->search( > {}, > { select => [ 'data', { count => 'data' } ], > as => [ 'data', 'cnt' ], > group_by => [ 'data' ], > }, > ); > > And then: > > $rec->data; > $rec->get_column('cnt'); > > Note the necessity of using get_column here, since "cnt" is not an > actual table column and thus won't have an auto-generated accessor > method. Hooray!!! Thank you! I didn't think of using an alias! Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidnicol at gmail.com Thu Jun 18 11:38:20 2009 From: davidnicol at gmail.com (David Nicol) Date: Thu, 18 Jun 2009 13:38:20 -0500 Subject: [Kc] Graph::Easy::StateMachine is now on CPAN Message-ID: <934f64a20906181138weadddeds889805a0b3ee0887@mail.gmail.com> to facilitate using state machine abstractions -- between myriad opposing forces From djgoku at gmail.com Thu Jun 18 13:37:52 2009 From: djgoku at gmail.com (djgoku) Date: Thu, 18 Jun 2009 15:37:52 -0500 Subject: [Kc] Win32::Registry::File Message-ID: <99dd19c90906181337m28cba3fem721f242563e548bf@mail.gmail.com> I am in need of a way to parse Registry Files which is also called a Registration Entries file. I have only found one module that can do mostly everything I want. But the module has not been updated since 2002. The one nice thing is that it mostly self-contained and has very few dependencies. Would it be better to update this to current standards or just re-write everything. I am leaning more towards just updating the current code to support my needs, and adding some tests. http://search.cpan.org/~avatar/Win32-Registry-File-1.10/File.pm Jonathan From frank at wiles.org Fri Jun 19 06:24:07 2009 From: frank at wiles.org (Frank Wiles) Date: Fri, 19 Jun 2009 08:24:07 -0500 Subject: [Kc] Win32::Registry::File In-Reply-To: <99dd19c90906181337m28cba3fem721f242563e548bf@mail.gmail.com> References: <99dd19c90906181337m28cba3fem721f242563e548bf@mail.gmail.com> Message-ID: <7bbd319d0906190624t1ffe13b9w613d95bcbabd1b3d@mail.gmail.com> On Thu, Jun 18, 2009 at 3:37 PM, djgoku wrote: > I am in need of a way to parse Registry Files which is also called a > Registration Entries file. I have only found one module that can do > mostly everything I want. But the module has not been updated since > 2002. The one nice thing is that it mostly self-contained and has very > few dependencies. Would it be better to update this to current > standards or just re-write everything. I am leaning more towards just > updating the current code to support my needs, and adding some tests. > > http://search.cpan.org/~avatar/Win32-Registry-File-1.10/File.pm I would go ahead and update the code for your use, with the tests, but send your patches to the maintainer in hopes they will update the module for everyone else. -- Frank Wiles Revolution Systems | http://www.revsys.com/ frank at revsys.com | (800) 647-6298 From amoore at mooresystems.com Mon Jun 29 13:14:14 2009 From: amoore at mooresystems.com (Andrew Moore) Date: Mon, 29 Jun 2009 15:14:14 -0500 Subject: [Kc] perl work ad on craigslist Message-ID: <6c70d2980906291314l78696d9bv6200e05ba8f3b73e@mail.gmail.com> I happened to run across this person looking for someone to write some perl for him. I thought someone here might want the chance to make a few bucks on the side. http://kansascity.craigslist.org/sad/1245219149.html I don't know anything about the person or the project. -Andy