Re: [Catalyst] Regex -- optional index.html

2007-03-01 Thread Boris Ćeranić

On 01/03/07, Bill Moseley [EMAIL PROTECTED] wrote:

I want to match these two (not using Chained, btw):

/training/webcasts/webcast_data/186/
/training/webcasts/webcast_data/186/index.html

But not this:

/training/webcasts/webcast_data/186/foo.html



(snip)




I tried these:


(snip)


Regex('^training/webcasts/webcast_data/(\d+)/?(index.html)?$')

matches:
../186/index.html   : yes
../186/foo.html : yes
../186/ : yes
../186  : yes



(snip)

Actually, this one works for me quite well - it should work fine for
following scenarios:

.../186
.../186/
.../186/index.html

In any other case, it will fail, as you can see:

$ perl -e 'print YES if webcast_data/186 =~
m|^webcast_data/(\d+)/?(index\.html)?$|;'
YES

$ perl -e 'print YES if webcast_data/186/ =~
m|^webcast_data/(\d+)/?(index\.html)?$|;'
YES

$ perl -e 'print YES if webcast_data/186/index.html =~
m|^webcast_data/(\d+)/?(index\.html)?$|;'
YES

$ perl -e 'print YES if webcast_data/186/asdf.html =~
m|^webcast_data/(\d+)/?(index\.html)?$|;'


Regards,
Boris

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] looping

2007-02-12 Thread Boris Ćeranić

On 12/02/07, Will Smith [EMAIL PROTECTED] wrote:

Hi,
 I may ask the same old question, but just could get it. So please help me
to get it done. All I want is looping through the record set for example: if
I want to loop through a column, I can use this:

 my @lname;
 
 my $column =
$c-model(myDB::Author)-get_column('last_name');
 while(my $name = $column-next){
 $lname[$i] = $name;
 $i = $i + 1;
 }
 -
 but if I try:
 my $recordset = [$c-model('myDB::Books')-search(
authorid = ${authorid} )];
 while(my $name = $recordset-next){
 $lname[$i] = $name-lname;
 $fname[$i] = $name-fname;
 $i = $i + 1;
 }
...

Thank you



You should have placed $recordset in foreach, like this:

my $recordset = [ something that returns list in list context ];

foreach my $name ( @$recordset ) {
...
}

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] plat_forms contest started -- user feedback requested

2007-01-25 Thread Boris Ćeranić

Hi,

Thank you for giving me a reminder :) I was certainly going to be
available for reviews today.

Best luck to our teams :)

Regards,
Boris

On 25/01/07, Alvar Freude [EMAIL PROTECTED] wrote:

Hi all,

as mentioned some time ago, there is the plat_forms contest, see
http://www.plat-forms.org/


All teams got their task two hours ago and now have 28 hours left ;-)

You can support the teams by user feedback. The teams will post the URLs of
their work on the plat_forms blog:

  http://www.plat-forms.org/2007/blog


Perl teams are:

  Team 1 (Etat de Genève/Optaros)
  Team 2 (plusW)
  Team 5 (Revolution Systems)

http://www.plat-forms.org/2007/the-teams

There are also three PHP and Java teams. No Ruby, Python and .NET teams,
because there where not enough teams.


From the task description:

  PbT (People by Temperament) is a simple community portal
   where members can find others with whom they might like
   to get in contact: people register to become members,
   take a personality test, and then search for others based
   on criteria such as personality types, likes/dislikes etc.
   Members can then get in contect with one another if both
   choose to do so.
   The system has both an interactice user interface via
   HTML pagesand a WDL/SOAP-based programmatic interface.


The intro slides with some information are here:

http://www.plat-forms.org/2007/documents/task-intro


The community may help the teams by giving user feedback and usual
community support. Helping coding is not allowed ;-)



Ciao
  Alvar



--
** Alvar C.H. Freude, http://alvar.a-blast.org/
** http://www.wen-waehlen.de/
** http://odem.org/
**http://www.assoziations-blaster.de/



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/






___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] plat_forms contest started -- user feedback requested

2007-01-25 Thread Boris Ćeranić

On 25/01/07, Matt S Trout [EMAIL PROTECTED] wrote:


On 25 Jan 2007, at 16:50, Boris Ćeranić wrote:

 It would be interesting to see how are they going to survive 30 hours
 of work... Are they going to catch some sleep at all, etc...

30hrs isn't really that much for a dev burn - I've pulled shifts that
long pretty often during heavy hacking without a problem. It's when
you get to around the 3 day mark without having had more than a
couple hours sleep that it starts to get painful.


It's not  impossible, I know it myself as well, but things change a
lot when you stabilise yourself (getting up in the morning, and
sleeping during the night)... It takes some time to be able to pull 2
day shifts.

Another questions is concentration as well as productivity rate during
shifts longer than 16 hours.



--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for
details.
+ Help us build a better perl ORM: http://dbix-
class.shadowcatsystems.co.uk/ +



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/