Re: [Catalyst] (no subject)
Hello Octavian, If you take a look at the generated files from DBIx::Class::Schema::Loader you'll see something like: # Created by DBIx::Class::Schema::Loader v0.07024 @ 2012-07-25 17:05:05 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YCnxLAuOQnGE4pbIiellqA where the md5sum, the loader version and date are going to be different. You are not suppose to editi anything above so I guess you made some change above the line and there is mismatch with the md5sum? Cheers, Dimitar On Thu, Aug 30, 2012 at 1:26 PM, Octavian Rasnita orasn...@gmail.comwrote: ** *From:* Dimitar Petrov mita...@gmail.com Hello, you can pass a use_moose = 1 option to the make_schema_at as it's described in the documentation here https://metacpan.org/module/DBIx::Class::Schema::Loader#make_schema_at Thanks. I used use_moose=1 in the Catalyst helper command line and it should have worked because it didn't give that error anymore, however it gave another one: DBIx::Class::Schema::Loader::make_schema_at(): Checksum mismatch in '/srv/ZRK2/script/../lib/ZRK/ZRKSchema/Result/Anunturi.pm', the auto-generated part of the file has been modified outside of this loader. Aborting. Which is strange, because I checked and on the Linux server Anunturi.pm is exactly the same as on my development computer (using Windows end of line on both places). Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] (no subject)
Hi Dimitar, From: Dimitar Petrov Hello Octavian, If you take a look at the generated files from DBIx::Class::Schema::Loader you'll see something like: # Created by DBIx::Class::Schema::Loader v0.07024 @ 2012-07-25 17:05:05 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YCnxLAuOQnGE4pbIiellqA where the md5sum, the loader version and date are going to be different. You are not suppose to editi anything above so I guess you made some change above the line and there is mismatch with the md5sum? Cheers, Dimitar Yes I know that it should be so, but I haven't changed anything on the server, above or below that line. The file on the Linux server is exactly the same as the file on Windows (I have checked them using diff -u) and they both have Windows end of line. But I can change the DBIC schema under Windows without problems, but not the DBIC schema on Linux. Maybe it has something to do with the fact that the Perl module on Linux uses a Windows end of line... although if the files are exactly the same, they should generate the same MD5 sum... Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] (no subject)
From: piet molenaar Subject: [Catalyst] (no subject) Hi, We work with svn were we've committed the schema classes also into the repository. Using the Catalyst helper script we tried to update the DBIC schema that was created with the Catalyst helper after checkout on another machine and the following error appeared.DBIx::Class::Schema::Loader::make_schema_at(): It is not possible to downgrade a schema that was loaded with use_moose = 1 to use_moose = 0, due to differing custom content at /home/danny/perl5/lib/perl5/Catalyst/Helper/Model/DBIC/Schema.pm line 635 I have to mention that we work both on Linux (Ubuntu) and Windows (7) configurations. The error appeared after building the schema on the Windows machine; checking it in and subsequently rebuilding (after changes) on Ubuntu. We also tried to install the latest version of DBIx::Class::Schema::Loader and the latest Catalyst helper, and then the latest DBIx::Class, and run the Catalyst helper to update the schema, but it still gives that error. What can we do? Where can we specify use_moose = 1 to make it work? We've looked into documentation but there is no mention about a best practice of keeping the schema files out of a shared repository. Or am I confused here? I also noted that a similar question was posed on the DBIX mailing list, but IMHO this list might be more appropriate. Cheers thanks in advance, Piet Yep, I put that question on DBIC mailing list because actually is about DBIC, but got no answer, so if someone on Catalyst mailing list know... please help. I have the same problem. Development on Windows and use in production on Ubuntu and then tried to update the DBIC schema on Ubuntu. Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] (no subject)
Hello, you can pass a use_moose = 1 option to the make_schema_at as it's described in the documentation here https://metacpan.org/module/DBIx::Class::Schema::Loader#make_schema_at However if you have already created the schema on your dev machine and you checkout the code on another machine, it's more like that you want to update the database structure using the existing schema? What I do usually I have 2 small scripts one called deploy.pl and one called make_schema_at.pl . My make_schema_at.pl creates DBIx::Class schema from an existing database and it looks like: make_schema_at( 'MyApp::Web::Schema', { debug = 1, use_moose = 1, # use_moose = 1 passed as a option dump_directory = $Bin/../lib, components = ['UUIDColumns', 'TimeStamp', 'InflateColumn::DateTime', 'PassphraseColumn'], }, [ $dsn ], ); and my deploy.pl makes to opposite: ... use MyApp::Web::Schema; my $dsn = '..'; # get dsn from config my $schema = MyApp::Web::Schema-connect($dsn); $schema-deploy(); You might want also to check the dbicdump ( https://metacpan.org/module/dbicdump ) where you can say -o use_moose=1 Cheers, Dimitar On Thu, Aug 30, 2012 at 11:25 AM, Octavian Rasnita orasn...@gmail.comwrote: ** *From:* piet molenaar piet@gmail.com *Subject:* [Catalyst] (no subject) Hi, We work with svn were we've committed the schema classes also into the repository. Using the Catalyst helper script we tried to update the DBIC schema that was created with the Catalyst helper after checkout on another machine and the following error appeared. DBIx::Class::Schema::Loader::make_schema_at(): It is not possible to downgrade a schema that was loaded with use_moose = 1 to use_moose = 0, due to differing custom content at /home/danny/perl5/lib/perl5/Catalyst/Helper/Model/DBIC/Schema.pm line 635 I have to mention that we work both on Linux (Ubuntu) and Windows (7) configurations. The error appeared after building the schema on the Windows machine; checking it in and subsequently rebuilding (after changes) on Ubuntu. We also tried to install the latest version of DBIx::Class::Schema::Loader and the latest Catalyst helper, and then the latest DBIx::Class, and run the Catalyst helper to update the schema, but it still gives that error. What can we do? Where can we specify use_moose = 1 to make it work? We've looked into documentation but there is no mention about a best practice of keeping the schema files out of a shared repository. Or am I confused here? I also noted that a similar question was posed on the DBIX mailing list, but IMHO this list might be more appropriate. Cheers thanks in advance, Piet Yep, I put that question on DBIC mailing list because actually is about DBIC, but got no answer, so if someone on Catalyst mailing list know... please help. I have the same problem. Development on Windows and use in production on Ubuntu and then tried to update the DBIC schema on Ubuntu. Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] (no subject)
On 28 February 2012 13:03, Johannes Kilian jo.kil...@gmx.de wrote: I cannot figure out how to set XML::Simple as default handler and override this for certain URLs within the same controller whilst for other URLs within the same controller the default XML-Handler is used $c-stash(current_view = '...'); Then override that either in an individual action or part of a chain ... ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] (no subject)
On 29/02/2012, at 12:03 AM, Johannes Kilian wrote: Hi, I've got following question concerning views: I want to provide an XML-View which provides standard XML-Files using XML::Simple in almost any case. Just in some cases I want to provide specialized XML-Files. In other words: I want to use XML::Simple as default handler - which is overriden by a specialized XML Generator in some cases ... Within my controller I do have something like this: __PACKAGE__-config( 'default' = 'text/html', 'stash_key' = 'rest', 'map' = { 'text/html' = [ 'View', 'TT', ], 'text/xml' = [ 'View', 'XML', ], #'text/xml' = 'XML::Simple', } ); - I cannot figure out how to set XML::Simple as default handler and override this for certain URLs within the same controller whilst for other URLs within the same controller the default XML-Handler is used Is this possible at all? How can I do this? I'd either use Catalyst::View;:Download::XML, or steal from it to create your own view: https://metacpan.org/module/Catalyst::View::Download::XML ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] (no subject)
On 28 Feb 2012, at 13:03, Johannes Kilian wrote: Hi, I've got following question concerning views: I want to provide an XML-View which provides standard XML-Files using XML::Simple in almost any case. Just in some cases I want to provide specialized XML-Files. Erm, why are you not just sending your already rendered standard XML file? I.e. what is the point in using XML::Simple at all here - why not just set the body? In other words: I want to use XML::Simple as default handler - which is overriden by a specialized XML Generator in some cases ... Within my controller I do have something like this: __PACKAGE__-config( 'default' = 'text/html', 'stash_key' = 'rest', 'map' = { 'text/html' = [ 'View', 'TT', ], 'text/xml' = [ 'View', 'XML', ], #'text/xml' = 'XML::Simple', } ); - I cannot figure out how to set XML::Simple as default handler and override this for certain URLs within the same controller whilst for other URLs within the same controller the default XML-Handler is used Is this possible at all? How can I do this? Erm, what do you mean by 'XML handler' here? XML::Simple will serialise whatever data structure you give it (as per any of the other serialisation methods!).. So just give it a different data structure in the different cases? Alternatively - if you really want to _totally_ override it, just set the response body manually, and the Controller::REST end action will leave it alone.. Cheers t0m ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] (no subject)
On Tue, Nov 27, 2007 at 06:50:07PM +0800, 伟 陈 wrote: i am a chinese guy..and my english is poor So is your ability to read replies to your own posts it seems. -- Chisel Wright e: [EMAIL PROTECTED] w: http://www.herlpacker.co.uk/ I'm demented in a good way! ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ Dev site: http://dev.catalyst.perl.org/