Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dami (6728)

dami
  (email not shown publicly)
+ -

  Comment: AppConfig; Games::Pentominos (Score 1) on 2010.01.12 9:17

by dami on 2010.01.12 9:17 (#71521)
Attached to: Great Perl Code

AppConfig by Andy Wardley is widely used, nontrivial in what it does (reading complex configuration data from various sources), and beautiful to read.

Games::Pentominos by myself is not very useful, but also nontrivial in what it does (solving a paving puzzle by recursive trial and error), and I shamelessly think it is quite nice to read, displaying a number of Perl features (regexes, functional grep/map, compilation on the fly, etc.).

Read More 4 comments
Comments: 4
+ -

  Comment: don't mix responsibilities (Score 1) on 2009.10.07 16:06

by dami on 2009.10.07 16:06 (#70809)
Attached to: Object Responsibilities versus Object Behavior

Hi Ovid,

Your example doesn't sound right to me. The job of a server is to serve requests; the job of an ORM is to give access to some persistence methods; merging both responsibilities into a single class, be it through inheritance or through roles, is confusing. I would rather have a ServerInfo class that keeps the persistent data, and a Server class that deals with requests, with a "has-a" relationship between them (and then it doesn't matter through which mechanism such classes are composed).

Besides, I agree that instances of DBIx::Class have too many methods, but that's not a consequence of using inheritance, it's a consequence of the particular DBIx::Class design, which is another mix of responsabilities : datasources and resultsets are merged into one single concept.

Read More 7 comments
Comments: 7
+ -

  Journal: Joining the Ironman challenge (finally) on 2009.08.08 7:37

Journal by dami on 2009.08.08 7:37
User Journal

After months of delaying the decision, I finally decided I had to join the Ironman planet and go blogging

.

The blog will not be on use.perl, but rather there.

Please stay in tune!

.

Read More 0 comments

+ -

  Comment: fulltext index through Pod::POM::Web::Indexer (Score 1) on 2009.06.29 1:51

by dami on 2009.06.29 1:51 (#69169)
Attached to: Search your perl documentation w/ perldoc-search

For info, Pod::POM::Web is a documentation viewer with an optional fulltext indexing module. You get a result like this :

Fulltext search for 'add_build_element'
Results 1 to 3 from 3

source Module/Build/Cookbook (2215) Module::Build::Cookbook - Examples of Module::Build Usage
...her stuff here... ); $build->add_build_element('dat'); $build->create_build_scr.../...her stuff here... ); $build->add_build_element('dat'); $build->create_build_scr.../...her stuff here... ); $build->add_build_element('dat'); $build->create_build_scr...

source Module/Build/Base (738) Module::Build::Base - Default methods for Module::Build
...nfigData->feature(@_); } } sub add_build_element { my ($self, $elem) = @_; ...

source Module/Build/API (738) Module::Build::API - API Reference for Module Authors
...k =head2 METHODS =over 4 =item add_build_element($type) [version 0.26] Adds a new...

Results 1 to 3 from 3

Read More 5 comments
Comments: 5
+ -

  Comment: Change ORM ! (Score 1) on 2009.01.29 11:32

by dami on 2009.01.29 11:32 (#67105)
Attached to: Are you using your objects, or are they using you?

Well, if 255 methods/27 classes are too much for your taste, change ORM!

DBIx::DataModel will only cost you about 50 methods in 3 classes (the exact number depends on how many relationships there are between this table and other tables).

(sorry, DBIC folks, I couldn't resist ...)

Read More 11 comments
Comments: 11
+ -

  Journal: Server-side MsWord document generation on 2009.01.07 23:05

Journal by dami on 2009.01.07 23:05
User Journal

I've been using the wonderful Spreadsheet::WriteExcel for a while, and was annoyed of not having an equivalent module for server-side MsWord document generation.

Now I finally found a solution : compose the doc. in HTML, add some MsWord-specific markup for page setup, wrap the whole thing in a MIME-multipart file ... and there it is, a document generated without MsOffice, but nevertheless with headers, footers, pagination, etc.

Read More 1 comments
Comments: 1
+ -

  ANNOUNCE: DBIx::DataModel 1.04 on 2008.09.29 19:06 dami

Submitted by dami on 2008.09.29 19:06
Module News
dami writes "

DBIx::DataModel v1.04 has been released to CPAN. This is
a major revision from previous v0.35, with several architectural
changes and added functionalities.

DBIx::DataModel is an Object-Relational mapping layer (ORM). Some of its
strong points are :

- UML-style declaration of relationships (instead of 'has_many',
    'belongs_to', etc.)

- efficiency through fine control of collaboration with the
    DBI layer (prepare/execute, fetch into reusable memory location, etc.)

- improved API for SQL::Abstract (named parameters, simplified 'orderBy')

- clear conceptual distinction between
        - data sources (tables and views),
        - database statements (stateful objects representing stepwise building
                                                        of an SQL query and stepwise retrieval of results),
        - data rows (lightweight hashrefs containing nothing but column
                                                        names and values)

- joins with simple syntax and possible override of default
    INNER JOIN/LEFT JOIN properties; instances of joins multiply
    inherit from their member tables

- named placeholders at the ORM level

- nested, cross-database transactions

The synopsis is in
http://search.cpan.org/dist/DBIx-DataModel/lib/DBIx/DataModel.pm;
the design principles and general architecture are explained
in http://search.cpan.org/dist/DBIx-DataModel/lib/DBIx/DataModel/Doc/Design.pod

"
Read More 0 comments

+ -

  Journal: ANNOUNCE: DBIx::DataModel 1.04 on 2008.09.29 19:06

Journal by dami on 2008.09.29 19:06
Module News

DBIx::DataModel v1.04 has been released to CPAN. This is
a major revision from previous v0.35, with several architectural
changes and added functionalities.

DBIx::DataModel is an Object-Relational mapping layer (ORM). Some of its
strong points are :

- UML-style declaration of relationships (instead of 'has_many',
    'belongs_to', etc.)

- efficiency through fine control of collaboration with the
    DBI layer (prepare/execute, fetch into reusable memory location, etc.)

- improved API for SQL::Abstract (named parameters, simplified 'orderBy')

- clear conceptual distinction between
        - data sources (tables and views),
        - database statements (stateful objects representing stepwise building
                                                        of an SQL query and stepwise retrieval of results),
        - data rows (lightweight hashrefs containing nothing but column
                                                        names and values)

- joins with simple syntax and possible override of default
    INNER JOIN/LEFT JOIN properties; instances of joins multiply
    inherit from their member tables

- named placeholders at the ORM level

- nested, cross-database transactions

The synopsis is in
http://search.cpan.org/dist/DBIx-DataModel/lib/DBIx/DataModel.pm;
the design principles and general architecture are explained
in http://search.cpan.org/dist/DBIx-DataModel/lib/DBIx/DataModel/Doc/Design.pod

Read More 0 comments

+ -

  Journal: ANNOUNCE: DBIx::DataModel 1.04 on 2008.09.26 2:38

Journal by dami on 2008.09.26 2:38
Module News
Read More 0 comments

+ -

  Geneva.pm meeting 04.07.2007. on 2007.06.29 4:13 dami

Submitted by dami on 2007.06.29 4:13
User Groups
Geneva.pm meets next Wednesday, July 4th. 2007.

19:00 meeting in "La Diligence", 2 rue Pécolat
19:15 conference on "A game in Perl" by Guillaume
            Cottenceau, author of Frozen Bubble
20:00 dinner in "Olympos", 3 rue Chaponnière,
            offered by the Plat_forms Geneva team

Please register at http://www.doodle.ch/dpC8uHbhrkfJ&l=fr
Read More 0 comments

+ -

  plat_forms report published June 20th, 2007 on 2007.06.20 4:22 dami

Submitted by dami on 2007.06.20 4:22
User Journal
The results and final report of the "Plat_forms" international programming contest were released yesterday in a press conference in Nuremberg, and will be published today June 20th, 2007 on http://www.plat-forms.org/.

For each of the categories Perl, PHP and Java, three teams of three people each competed to produce a comprehensive "social networking" application in just 30 hours.

Team Etat de Genève / Optaros was declared winner of the Perl track. The Geneva solution, based on Catalyst and DBIx::DataModel, was especially praised for its compactness. However, other Perl solutions by "plusW" (Germany) and "Revolution Systems" (USA) were very close, and it was hard for the jury to decide. The report notes that compactness and extensibility are consistent qualities of the Perl solutions.

For the Geneva team, that was a really instructive experience. It confirmed that we work with the right technology and skills ... but also showed that we still have some progress to make as a team in the priorization and quality insurance processes!

See http://www.plat-forms.org/ for the complete report and for many interesting observations on these 3 development platforms. A detailed report of what happened in Geneva team is published on http://www.plat-forms.org/2007/blog/archive/2007/01/29/journal-of-team1

Read More 0 comments

+ -

  Journal: plat_forms report published June 20th, 2007 on 2007.06.20 4:22

Journal by dami on 2007.06.20 4:22
User Journal

The results and final report of the "Plat_forms" international programming contest were released yesterday in a press conference in Nuremberg, and will be published today June 20th, 2007 on http://www.plat-forms.org/.

For each of the categories Perl, PHP and Java, three teams of three people each competed to produce a comprehensive "social networking" application in just 30 hours.

Team Etat de Genève / Optaros was declared winner of the Perl track. The Geneva solution, based on Catalyst and DBIx::DataModel, was especially praised for its compactness. However, other Perl solutions by "plusW" (Germany) and "Revolution Systems" (USA) were very close, and it was hard for the jury to decide. The report notes that compactness and extensibility are consistent qualities of the Perl solutions.

For the Geneva team, that was a really instructive experience. It confirmed that we work with the right technology and skills ... but also showed that we still have some progress to make as a team in the priorization and quality insurance processes!

See http://www.plat-forms.org/ for the complete report and for many interesting observations on these 3 development platforms. A detailed report of what happened in Geneva team is published on http://www.plat-forms.org/2007/blog/archive/2007/01/29/journal-of-team1

Read More 6 comments
Comments: 6