You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(19) |
Nov
(22) |
Dec
(19) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(35) |
Feb
(5) |
Mar
(13) |
Apr
(9) |
May
(3) |
Jun
(16) |
Jul
|
Aug
(6) |
Sep
(15) |
Oct
(5) |
Nov
(3) |
Dec
(7) |
2003 |
Jan
(16) |
Feb
(10) |
Mar
(19) |
Apr
(13) |
May
(5) |
Jun
(20) |
Jul
(33) |
Aug
(9) |
Sep
(1) |
Oct
(12) |
Nov
(17) |
Dec
(2) |
2004 |
Jan
(3) |
Feb
(9) |
Mar
(7) |
Apr
(16) |
May
(6) |
Jun
(6) |
Jul
(18) |
Aug
(8) |
Sep
(27) |
Oct
(8) |
Nov
(14) |
Dec
(29) |
2005 |
Jan
(1) |
Feb
(11) |
Mar
(33) |
Apr
(2) |
May
(4) |
Jun
(21) |
Jul
(41) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2006 |
Jan
(8) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Vsevolod (S. I. <si...@cs...> - 2004-02-23 19:59:56
|
Ray Zimmerman wrote: > Looks like a good start. I also can't promise I'll give a detailed look= =20 > at every step, but I'll do my best to keep up and run any working test=20 > code when you get to that point.=20 Oh, I already have the testing code. :) These tests are already=20 satisfied. I just did not want to post the actual code yet, because=20 things may change, and it's important to get the requirements right. I keep close to Chris's code structure so far. Simon --=20 Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com The unknown is honoured, the known is neglected - until all is known. The C=FA Chulaind myth |
From: Ray Z. <rz...@co...> - 2004-02-23 16:09:36
|
Looks like a good start. I also can't promise I'll give a detailed look at every step, but I'll do my best to keep up and run any working test code when you get to that point. I'll try to respond in some way to any specific requests for feedback. And, I too, appreciate the work you're doing on this. Ray Zimmerman Director, Laboratory for Experimental Economics and Decision Research 428-B Phillips Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 fax: (815) 377-3932 |
From: Chris W. <ch...@cw...> - 2004-02-23 05:52:41
|
On Feb 22, 2004, at 11:51 PM, Vsevolod (Simon) Ilyushchenko wrote: > I have taken the first shot at the new object linking system. I > decided to consider Ray's examples as tests and create a Test::Unit > class that would go through them and make sure all of them work. I > have started with the auto-fetch/auto-save example with Boat (X) and > Anchor (A). The module with tests is attached. Simon, I really appreciate the work you're doing. I'm heads-down on OpenInteract2 (and a couple of related items) for a while so I'm not going to be able to follow along. But please don't let my silence be mistaken for apathy. Thanks, Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Chris W. <ch...@cw...> - 2004-02-23 05:40:02
|
On Feb 23, 2004, at 12:07 AM, Vsevolod (Simon) Ilyushchenko wrote: > Some error messages get truncated for the following reason: > > In ClassFactory::exec_behavior you have: > my ( $status, $msg ) = $behavior->( $this_class ); > Then, if $status is ERROR, the $msg is printed. > > However, sometimes you return more than two values from a behavior > function. Witness ClassFactory::DBI::conf_relate_links_to: > the error message is returned as > return ( ERROR, "Failed to retrieve configuration from ", > "'$to_class': $@. (Require error: $require_error)" ); > > If the comma after the first line were changed to a dot, all will be > well. There are other cases like that. Thanks. I fixed the three cases I found. Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Vsevolod (S. I. <si...@cs...> - 2004-02-23 05:15:41
|
Chris, Some error messages get truncated for the following reason: In ClassFactory::exec_behavior you have: my ( $status, $msg ) =3D $behavior->( $this_class ); Then, if $status is ERROR, the $msg is printed. However, sometimes you return more than two values from a behavior=20 function. Witness ClassFactory::DBI::conf_relate_links_to: the error message is returned as return ( ERROR, "Failed to retrieve configuration from ", "'$to_class': $@. (Require error: $require_error)" ); If the comma after the first line were changed to a dot, all will be=20 well. There are other cases like that. Simon --=20 Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com The unknown is honoured, the known is neglected - until all is known. The C=FA Chulaind myth |
From: Vsevolod (S. I. <si...@cs...> - 2004-02-23 04:59:14
|
Chris and Ray, I have taken the first shot at the new object linking system. I decided=20 to consider Ray's examples as tests and create a Test::Unit class that=20 would go through them and make sure all of them work. I have started=20 with the auto-fetch/auto-save example with Boat (X) and Anchor (A). The=20 module with tests is attached. Let me know if you want to see similar updates after every step or you'd=20 rather only see the finished product. Simon --=20 Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com The unknown is honoured, the known is neglected - until all is known. The C=FA Chulaind myth |
From: Teemu A. <te...@io...> - 2004-01-19 20:31:18
|
> Latest CVS checkout: > cvs -d :pserver:ano...@mi...:/opt/cvs login > Login with blank password (Just press enter). > cvs -d :pserver:ano...@mi...:/opt/cvs checkout dicole Seems like I had my firewall too tight =) It was not available until now. Sorry about that. - Teemu |
From: Teemu A. <te...@io...> - 2004-01-12 03:18:08
|
Hello, for a while we have been developing a nice object oriented toolkit for making application development on OpenInteract easy. The main idea is that when creating applications, you don't have to creaty _any_ templates for your project. Dicole core just provides generic templates for different content and an object oriented interface to hide all dirty template parameter details. That way you may build sites completely out of widgets. Site layout is controlled completely through CSS and the page sources are based on XHTML. I have extended the toolkit with a system called Dicole::Generictool. Most applications that work with some sort of data objects usually are satisfactory when they provide at least functionality to add, list, remove, show and edit objects. Generictool addresses just those, adds a couple of nice features and makes everything easy to extend. For example, here is sample code of my current "list" handler method that features browsing, sorting, searching and listing of objects and some fields: sub list { my ( $class, $p ) = @_; my ( $R, $tool, $gentool ) = $class->_common_init( params => $p ); $tool->Path->add( name => 'List users' ); # Modify tool object to contain our form in a single legend box $tool->Container->box_at( 0, 0 )->set_name( 'List of users' ); $tool->Container->box_at( 0, 0 )->add_content( $gentool->get_list( 'list' ) ); return $R->template->handler( $tool->get_template_handler_structure ); } Not too many lines of code =). _common_init basically only defines the object fields with some added meta-data. Generictool also takes care of input validation. Here is my add method, for example: sub add { my ( $class, $p ) = @_; my ( $R, $tool, $gentool ) = $class->_common_init( params => $p ); $tool->Path->add( name => 'Add new user' ); if ( $R->apache->param( 'save' ) ) { ( $p->{return_code}, $p->{return} ) = $gentool->validate_input( $gentool->visible_fields('add'), { clear_output => 1 } ); if ( $p->{return_code} ) { $p->{return} = "User has been saved."; } else { $p->{return} = sprintf( "Failed adding user: %s", $p->{return} ); } $tool->set_return( $p->{return_code}, $p->{return} ); } # Modify tool object to contain our form in a single legend box $tool->Container->box_at( 0, 0 )->set_name( 'New user details' ); $tool->Container->box_at( 0, 0 )->add_content( $gentool->get_add( 'add' ) ); return $R->template->handler( $tool->get_template_handler_structure ); } No single template needed for that handler, either. Dicole is going to be the total rewrite (sequel) of MimerDesk (www.mimerdesk.org), a groupware I created during the years. This time I'm going to make the sources a little bit more maintainable. I try to keep the documentation if the source code complete so using it shouldn't be a problem in anyone is interested to try it so early in the development. Links: The current unstable CVS is browsable here: http://www.mimerdesk.org/cgi-bin/cvsweb.cgi/dicole/ Dicole documentation (draft, partly incomplete): http://inf.dicole.fi/dicole_docs/ Generictool documentation: http://inf.dicole.fi/dicole_docs/Dicole/Generictool.html Example handler code: http://www.mimerdesk.org/cgi-bin/cvsweb.cgi/dicole/pkg/user_manager/OpenInteract/Handler/UserManager.pm?rev=1.50&content-type=text/x-cvsweb-markup Example application for trying the results out (Mozilla recommended): http://dev1.dicole.fi/Usermanager/ Latest CVS checkout: cvs -d :pserver:ano...@mi...:/opt/cvs login Login with blank password (Just press enter). cvs -d :pserver:ano...@mi...:/opt/cvs checkout dicole -- Sincerely, Teemu Arina mimerdesk.org |
From: Chris W. <ch...@cw...> - 2004-01-10 02:36:12
|
I've modified SPOPS to get rid of the horrible, horrible built-in debugging (_w and _wm) and modified everything to use Log4perl. This is an extremely flexible logging system and makes your life much simpler. I've created a script to scan your existing code and modify any _w and _wm calls to call log4perl. It's a 90% solution -- it won't try and find crazy invocations but it should take care of the most common cases. While Log::Log4perl (and Log::Dispatch) is now a dependency and there's an automated way to changed your existing statements, the _w() and _wm() methods aren't removed yet. Calling them just calls log4perl under the covers. Hopefully this will minimize any initial pain for people who cannot easily modify production servers. If you're interested in testing out the 0.81 distribution let me know. I hope to get it out soon after I've had a chance to look over Simon's recent posts. Chris -- Chris Winters Creating enterprise-capable snack systems since 1988 |
From: Chris W. <ch...@cw...> - 2003-12-03 00:01:03
|
David C. Reed wrote: > Ran into this error when creating a new account in OI2: > > Can't locate object method "_send_user_email" via package > "OpenInteract2::Action::NewUser" (perhaps you forgot to load > "OpenInteract2::Action::NewUser"?) at > C:\OI2\WEB\FirstSite\tmplib/OpenInteract2/Action/NewUser.pm line 33. > > Believe this error was caused by a typo -- fixed it by changing > "_send_user_email" to "_send_new_user_email" in > OpenInteract2::Action::NewUser line 33. Yep, this was reported a few weeks ago and fixed. Thanks for the report! The next beta should be out in about two weeks and it will include the fix. You can also checkout CVS, but it's not guaranteed stable at any particular time. (Now is a good example :-) Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: David C. R. <dr...@xo...> - 2003-12-02 23:42:38
|
Hi: Ran into this error when creating a new account in OI2: Can't locate object method "_send_user_email" via package "OpenInteract2::Action::NewUser" (perhaps you forgot to load "OpenInteract2::Action::NewUser"?) at C:\OI2\WEB\FirstSite\tmplib/OpenInteract2/Action/NewUser.pm line 33. Believe this error was caused by a typo -- fixed it by changing "_send_user_email" to "_send_new_user_email" in OpenInteract2::Action::NewUser line 33. Dave |
From: Chris W. <ch...@cw...> - 2003-11-18 01:07:24
|
Teemu wrote: > In several fresh setups I have run into the following error: > > Compression not available - Install IO::Zlib! at > /usr/lib/perl5/site_perl/5.6.1/OpenInteract/Package.pm line 1111 > > Seems like Archive::Tar doesn't require it but OI uses functionality that > requires Zlib compression. Maybe add the requirement in Makefile.PL? This must be a new development -- I'll add this to the prerequisites. Thanks for the pointer. Chris |
From: Teemu <te...@io...> - 2003-11-17 23:36:53
|
In several fresh setups I have run into the following error: Compression not available - Install IO::Zlib! at /usr/lib/perl5/site_perl/5.6.1/OpenInteract/Package.pm line 1111 Seems like Archive::Tar doesn't require it but OI uses functionality that requires Zlib compression. Maybe add the requirement in Makefile.PL? -- Sincerely, Teemu Arina Ionstream Oy / Dicole Komeetankuja 4 A 02210 Espoo FINLAND Tel: +358-(0)50 - 555 7636 http://www.dicole.fi http://www.mimerdesk.org |
From: Andrew H. <hur...@ll...> - 2003-11-17 23:06:47
|
I found the problem, I'm working on a commenting package similar to comments, but this will include comment sections, and a bunch of other security stuff as well. Well I said my document system spops objects were 'isa' OpenInteract::Commentable, which was from the comments package and wasn't installed. I removed that and all was good. Thanks for the pointer. -Andrew At 2:55 PM -0500 11/17/03, Chris Winters wrote: >Andrew Hurst wrote: >>Can't locate object method "error" via package >>"OpenInteract::Request" at >>/usr/local/lib/perl5/site_perl/5.8.0/OpenInteract/Request.pm line >>123. > >This happens when OI isn't initialized properly -- take a look at >your *server* (not vhost) error log and see if there's anything >illuminating there. > >Chris > >-- >Chris Winters (ch...@cw...) >Building enterprise-capable snack solutions since 1988. |
From: Chris W. <ch...@cw...> - 2003-11-17 20:00:18
|
Andrew Hurst wrote: > Can't locate object method "error" via package "OpenInteract::Request" > at /usr/local/lib/perl5/site_perl/5.8.0/OpenInteract/Request.pm line 123. This happens when OI isn't initialized properly -- take a look at your *server* (not vhost) error log and see if there's anything illuminating there. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Andrew H. <hur...@ll...> - 2003-11-17 19:07:22
|
Can't locate object method "error" via package "OpenInteract::Request" at /usr/local/lib/perl5/site_perl/5.8.0/OpenInteract/Request.pm line 123. Thats the error I'm getting when I try to access my OI development website. It only happens after I install the module I've been working on. So far I've tried the solution presented here: http://openinteract.sourceforge.net/cgi-bin/twiki/view/OI/FruitExample But I think that that error wasn't exactly what I'm getting. Any ideas what I could do in my module that might cause this error? It happens at the top level of the site ( i.e. when I access http://www.example.com/ ). The only thing I can think is that there must be something I define in my module that affects the whole site's action system. I include some useful information below. Thanks for the help, -Andrew The following is the error as seen in the error log when I get this in the browser: ============================== Request started: Mon Nov 17 10:17:23 2003 path: ( / ) PID: (36083) OpenInteract::setup_server_interface (147) >> Server hostname set to www.example.com:8081 OpenInteract::setup_server_interface (150) >> Request coming from 128.115.78.79 OpenInteract::parse_uri (206) >> Original path: (/) OpenInteract::parse_uri (214) >> Items in the path: OpenInteract::parse_uri (227) >> Action found from URL: OpenInteract::parse_uri (234) >> Original path/query string set to: / OpenInteract::Request::lookup_conductor (224) >> Find conductor for action () OpenInteract::Request::lookup_action (253) >> Find action corresponding to () OpenInteract::Request::lookup_action (274) >> Found action info for () OpenInteract::find_action_handler (246) >> Conductor not found; displaying oops page. --EXITED WITH ERROR from main handler eval block Error: 0 As these might matter also, I've also pasted my action.perl and spops.perl # action.perl # all of the method's mentioned exist, as does the default method # for those entries that need it. $action = { 'document' => { 'class' => 'OpenInteract::Handler::Document', 'security' => 'yes', 'cache_key' => { show => 'document::show', }, 'cache_expire' => { show => 700, }, }, 'documentpage' => { 'class' => 'OpenInteract::Handler::DocumentPage', 'security' => 'yes', }, 'document_section' => { 'is_lookup' => 'yes', 'object_key' => 'document_section', 'order' => 'section', 'field_list' => [ 'section' ], 'label_list' => [ 'Section' ], 'size_list' => [ 25 ], 'title' => 'Document Sections', }, 'document_tools_box' => { 'template' => 'document_tools_box', 'package' => 'document', 'title' => 'Document Tools', 'weight' => 4, 'security' => 'no', }, 'document_page_tools_box' => { 'template' => 'document_page_tools_box', 'package' => 'document', 'title' => 'Document Page Tools', 'weight' => 4, 'security' => 'no', }, 'show_document_paragraph' => { 'class' => 'OpenInteract::Handler::DocumentParagraph', 'method' => 'show_para', 'security' => 'no', }, }; # spops.perl $spops = { 'document' => { class => 'OpenInteract::Document', isa => [ qw/ OpenInteract::SPOPS::DBI SPOPS::Secure SPOPS::DBI::MySQL SPOPS::DBI / ], rules_from => [ qw/ SPOPS::Tool::DBI::MaintainLinkedList/ ], field => [ qw/ document_id posted_on posted_by title document_text section active prev_document_id next_document_id expires_on active_on num_pages / ], column_group => { listing => [ qw/ posted_on posted_by title section active expires_on active_on / ] }, id_field => 'document_id', increment_field => 1, sequence_name => 'oi_document_seq', base_table => 'document', no_insert => [ qw/ document_id / ], skip_undef => [ qw/ section active expires_on / ], sql_defaults => [ qw/ section active / ], no_update => [ qw/ document_id posted_on num_pages / ], field_alter => {}, alias => [], fulltext_field => [ 'title', 'document_text' ], has_a => { 'OpenInteract::User' => [ 'posted_by' ] }, links_to => {}, creation_security => { u => undef, g => { 3 => 'WRITE' }, w => 'READ', }, as_string_order => [ qw/ title document_text section posted_on posted_by expires_on num_pages / ], as_string_label => { title => 'Title', document_text => 'Document Text', posted_on => 'Posted On', posted_by => 'Posted By', expires_on => 'Expires On', section => 'Section', num_pages => 'Number of Pages' }, track => { create => 1, update => 1, remove => 1 }, display => { url => '/document/view/' }, name => 'title', object_name => 'Document', # Linked List stuff linklist_previous => 'prev_document_id', linklist_next => 'next_document_id', }, 'document_page' => { class => 'OpenInteract::DocumentPage', isa => [ qw/ OpenInteract::SPOPS::DBI SPOPS::Secure SPOPS::DBI::MySQL SPOPS::DBI OpenInteract::Commentable / ], rules_from => [], field => [ qw/ document_page_id title page_text page_num document_id max_page_num num_paragraphs / ], column_group => { listing => [ qw/ title / ] }, id_field => 'document_page_id', increment_field => 1, sequence_name => 'oi_document_page_seq', base_table => 'document_page', no_insert => [ qw/ document_page_id / ], skip_undef => [], sql_defaults => [], no_update => [ qw/ document_page_id document_id page_num max_page_num / ], field_alter => {}, alias => [], fulltext_field => [ 'title', 'page_text' ], has_a => {}, links_to => { 'OpenInteract::Document' => [ 'document_id' ] }, creation_security => { u => undef, g => { 3 => 'WRITE' }, w => 'READ', }, as_string_order => [ qw/ title page_text / ], as_string_label => { title => 'Title', page_text => 'Page Text' }, track => { create => 1, update => 1, remove => 1 }, display => { url => '/document_page/view/' }, name => 'title', object_name => 'DocumentPage', }, 'document_paragraph' => { class => 'OpenInteract::DocumentParagraph', isa => [ qw/ OpenInteract::SPOPS::DBI SPOPS::Secure SPOPS::DBI::MySQL SPOPS::DBI OpenInteract::Commentable / ], rules_from => [], field => [ qw/ document_paragraph_id para_text para_num document_page_id / ], column_group => { listing => [ qw/ para_text / ] }, id_field => 'document_paragraph_id', increment_field => 1, sequence_name => 'oi_document_para_seq', base_table => 'document_paragraph', no_insert => [ qw/ document_paragraph_id / ], skip_undef => [], sql_defaults => [], no_update => [ qw/ document_paragraph_id document_page_id para_num / ], field_alter => {}, alias => [], fulltext_field => [ 'para_text' ], has_a => {}, links_to => { 'OpenInteract::DocumentPage' => [ 'document_page_id' ] }, creation_security => { u => undef, g => { 3 => 'WRITE' }, w => 'READ', }, as_string_order => [ qw/ para_text / ], as_string_label => { para_text => 'Paragraph Text' }, track => { create => 1, update => 1, remove => 1 }, display => { url => '/document_paragraph/view/' }, name => 'para_text', object_name => 'DocumentPage', }, document_section => { class => 'OpenInteract::DocumentSection', code_class => [], isa => [ qw/ OpenInteract::SPOPS::DBI SPOPS::DBI::MySQL SPOPS::DBI / ], field => [ qw/ document_section_id section / ], id_field => 'document_section_id', no_insert => [ 'document_section_id' ], increment_field => 1, sequence_name => 'oi_document_section_seq', base_table => 'document_section', name => 'section', object_name => 'Document Section', display => { url => '/Lookups/' }, }, }; |
From: Andrew H. <hur...@ll...> - 2003-11-14 17:43:46
|
So I was developing a new package yesterday, and when I ran check_package through oi_manage it didn't seem like anything was happening (I run it through a script I wrote). So I ran it by hand, and this is what happened: ahurst@sdcsi3 document$ oi_manage --package_dir=./ check_package [oi_manage]: Using (/usr/local/OpenInteract) for 'base_dir'. [oi_manage]: Using (/usr/local/OpenInteract/sites/ahurst_dev) for 'website_dir'. Running check_package... ========================= Segmentation fault ahurst@sdcsi3 document$ and I have a perl.core in that directory now. Anyway, while I was trying to debug this, I found a bug in oi_manage. Line 546 (related to check_package) of oi_manage revision 1.67 looks like: if ( $OPT_package_dir and ! $OPT_package_dir ) { Looks like a -d is missing. I tested it and that branch is never visited. Changed the line to: if ( $OPT_package_dir and ! -d $OPT_package_dir ) { and it works correctly now. But it still segfaults. Of course, had I looked online first I would have found this: http://openinteract.sourceforge.net/docs/actions.shtml#how%20can%20i%20ensure%20the%20configuration%20file's%20syntax%20is%20ok which showed me a syntax error in my action.perl. So to summarize, one bug found, one non-bug fixed. No more segfaulting. -Andrew |
From: <cwi...@cw...> - 2003-11-14 02:48:55
|
* Andrew Hurst (hur...@ll...) [031112 13:36]: > Finally back to work with OpenInteract, I've got a question. I'm > working on a document management system, and the documents will be > broken up into pages and paragraphs. The general idea is: > > Document 1->N DocumentPage 1->N DocumentParagraph. > > Relevant table structure: > Document has a document_id > DocumentPage has a document_page_id, and document_id > DocumentParagraph has a document_paragraph_id and a document_page_id Got it so far... > What I would like to do, is represent this link somehow in the > spops.perl, but I'm not exactly sure how. I want to be able to be > using a document object, and get the list of documentPage objects > associated with it by just doing: > @doc_pages = @{ $document->document_pages }; > I've looked into has_a, and links_to, but they don't seem to do > exactly what I need. Specifically it looks as if I need to keep the > id of the DocumentPage object that is 'had' by the Document object in > the Document table. Is there a way to specify 'linked_by' > relationships? Actually, the 'links_to' will do this as a side effect, although you won't be able to properly use the _add and _remove functionality. See the SPOPS configurations for theme and theme_property (pkg/base_theme-x.xx/conf/spops.perl) as an example, where: Theme (theme_id) -> Theme Property (each w/theme_id) links_to > In writing this I've realized that this could be a huge performance > hit for big documents with lots of pages and paragraphs (the one that > I'm designing this for has about 99 pages in Word). I might just > have to write a few functions to fetch this information manually and > only set it if needed... If there's any question about performance and fetching lots and lots of objects at a time, particularly when I'm dealing with them in chunks or in a stream, then I usually write it by hand. Like the following when you're dealing with the items as a stream: package My::Document; sub document_pages { my ( $self ) = @_; my $iterator = eval { My::DocumentPage->fetch_iterator({ where => 'document_id = ?', value => [ $self->id ], order => 'page_num' }) }; if ( $@ ) { ... } return $iterator; } Then you'd deal with each page: $iterator = $document->document_pages; while ( $iterator->has_next ) { my $page = $iterator->get_next; print "Page $page->{page_num}: $page->{title}\n"; } You could even modify this to do a parameterized stream vs. list: sub document_pages { my ( $self, $return_type ) = @_; $return_type ||= 'stream'; my $method = ( $return_type eq 'stream' ) ? 'fetch_iterator' : 'fetch_group'; my $values = eval { My::DocumentPage->$method({ ... These are so easy to write and the underlying assumptions for relationships tend to change so infrequently that it's usually best to go ahead and write the implementation if you have any questions about it. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Andrew H. <hur...@ll...> - 2003-11-12 18:19:45
|
Hello there, Finally back to work with OpenInteract, I've got a question. I'm working on a document management system, and the documents will be broken up into pages and paragraphs. The general idea is: Document 1->N DocumentPage 1->N DocumentParagraph. Relevant table structure: Document has a document_id DocumentPage has a document_page_id, and document_id DocumentParagraph has a document_paragraph_id and a document_page_id What I would like to do, is represent this link somehow in the spops.perl, but I'm not exactly sure how. I want to be able to be using a document object, and get the list of documentPage objects associated with it by just doing: @doc_pages = @{ $document->document_pages }; I've looked into has_a, and links_to, but they don't seem to do exactly what I need. Specifically it looks as if I need to keep the id of the DocumentPage object that is 'had' by the Document object in the Document table. Is there a way to specify 'linked_by' relationships? In writing this I've realized that this could be a huge performance hit for big documents with lots of pages and paragraphs (the one that I'm designing this for has about 99 pages in Word). I might just have to write a few functions to fetch this information manually and only set it if needed... Any pointers? Thanks. -Andrew |
From: forehead<for...@4r...> - 2003-11-03 14:57:03
|
hi, openinteract-dev in apache cgi envriment, the first page [URL:/] gets: the code took: 5 wallclock secs ( 1.73 usr 0.23 sys + 0.00 cusr 0.11 csys = 2.06 CPU) the code took: 4 wallclock secs ( 1.76 usr 0.22 sys + 0.00 cusr 0.11 csys = 2.09 CPU) and same code under mod_perl gets: the code took: 1 wallclock secs ( 0.46 usr + 0.07 sys = 0.53 CPU) # fisrt request the code took: 0 wallclock secs ( 0.16 usr + 0.01 sys = 0.17 CPU) # later request apache 1.3.26 with mod_perl 1.26 OS: (use dmesg): ================================= FreeBSD 4.8-RELEASE #0: Thu Apr 3 10:53:38 GMT 2003 ro...@fr...:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz CPU: Intel(R) Celeron(TM) CPU 1000MHz (1001.77-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6b1 Stepping = 1 Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE> real memory = 125763584 (122816K bytes) avail memory = 117137408 (114392K bytes) in cgi mode, it seems need more time to init, process, I still not clear which phrase is the time-cost-est still no idea about cache's effect. some optimize policy? # cgi-bin/oi2.cgi #================ use Benchmark; { # benchmark start tag my $t0 = new Benchmark; .... $response->send; # benchmark end tag my $t1 = new Benchmark; my $td = timediff($t1, $t0); print "the code took:",timestr($td),"\n"; } # Apache::OpenInteract2.pm #========================= use Benchmark; sub handler($$) { my ( $class, $r ) = @_; # benchmark start tag my $t0 = new Benchmark; .... $response->send; # benchmark end tag my $t1 = new Benchmark; my $td = timediff($t1, $t0); print "the code took:".timestr($td)."\n"; return $response->status; } ---------------------- forehead (Chun Sheng) for...@4r... 2003-11-03 |
From: forehead<for...@4r...> - 2003-11-03 09:35:39
|
hi, openinteract-dev another question , when I restart apache for OI2, the warning lines such like this occurred, how to avoid show this? Use of uninitialized value in string eq at /usr/local/lib/perl5/5.8.0/File/Spec/Unix.pm line 77. I have ever seen some code do rewrite __WARN__ handle, and I tried myself but no effect. ---------------------- forehead (Chun Sheng) for...@4r... 2003-11-03 |
From: forehead<for...@4r...> - 2003-11-03 02:45:23
|
hi, openinteract-dev sorry , the mail just send from me is a little wrong : not OpenInteract2::SQLInstall::Security but OpenInteract2::Action::Security by the way , I cannot receive this maillist's general mails which like the mail I just send (, or I can reply that and not post a new mail). I only can receive the day digest from the maillist. and some times cannot receive Mrs Chris Winters' reply mail except the last two. confusing... ---------------------- forehead (Chun Sheng) for...@4r... 2003-11-03 |
From: forehead<for...@4r...> - 2003-11-03 02:36:08
|
hi, openinteract-dev in the OI2 base packages, the spop class in conf/spops*.dat file, is: OpenInteract::Security but there no such class could find. I looked through the base_security/change file, and found some times ago, there is a module named such, but now it seems migration to OpenInteract2::SQLInstall::Security. then, should we update the other pkgs' conf/install_security.dat files settting? e.g. in base_page/conf/install_security.dat line 3: spops_class => 'OpenInteract2::Security', change into: spops_class => 'OpenInteract2::SQLInstall::Security', ---------------------- forehead (Chun Sheng) for...@4r... 2003-11-03 |
From: Chris W. <ch...@cw...> - 2003-11-03 01:03:51
|
forehead wrote: > ... > Apache without mod_perl: just cgi reguest type, I still not > understand how to request /user/NewUser for cgi env. Is it > http://site/cgi-bin/user/NewUser/oi2.cgi?foo=bar ? or others? This should be: http://site/cgi-bin/oi2.cgi/user/NewUser/?foo=bar We take everything between 'oi2.cgi' and the query string as the PATH_INFO and use that for the actual URL request. (See lines 35-43 of OI2::Request::CGI for the details.) > Standalone: should restart the deamon ? or just leave it? I not yet > test thus, since I wanner my code run under apache with mod_perl. Yes, you'll need to restart the daemon. The quickest development turnaround would be CGI, since it will load and rebuild everything for every request you don't need to worry about reloading. But if you're working on a fast machine restarting an Apache/mod_perl process can be quite quick. My main development machine (P3/1Ghz/512MB) is fast enough to do Apache/mod_perl restarts very often. (And keeping the debugging level at INFO or above helps...) Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Chris W. <ch...@cw...> - 2003-11-03 00:53:14
|
forehead wrote: > oi2_manage, line 70: > my $log_level = ( $OPT_debug == 1 ) ? $INFO : $DEBUG; > > should be: > my $log_level = ( $OPT_debug == 1 ) ? $DEBUG : $INFO; Thanks, fixed. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |