Re: [Catalyst] XML RPC Server and RenderView

2007-08-24 Thread Joe Landman

Nicolas Raspail wrote:


Hello,

when playing with Catalyst::Plugin::Server::XMLRPC following the 
documentation, I get the same behaviour as Joe.


Hmmm I thought it was just me.

I have search the archive and found thie mail from Joe Landman , and he 
has the same problem, but unfortunately, nobody answer him.


True.  I am guessing that this is due to few people using XMLRPC in 
Catalyst.  This is a shame as it really looks like a nice module to use 
, and is exactly what I want to do ...  I have since hacked what I need 
to do into some controllers/display logic outside of XMLRPC, though I 
would rather get XMLRPC going.



--

Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
   http://jackrabbit.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 866 888 3112
cell : +1 734 612 4615


___
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] CMS

2007-08-23 Thread Joe Landman
Cory Watson wrote:
 On 8/23/07, Simon Wilcox [EMAIL PROTECTED] wrote:
 If you want sledgehammers, Bricolage and Krang are probably the beefiest
 ones you can find :-)

 www.bricolage.cc  www.krangcms.com
 
 Bricolage I was aware of, but krang is new to me.

I had sent a note to one of the people listed on the Krang site.  I was
interested in it a while ago as well.

I would like to get/use a Cat-based CMS.  Unfortunately, I don't have
time/resources to write one.


-- 
joe

___
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/


[Catalyst] Pilot error/cluelessness with XMLRPC

2007-07-22 Thread Joe Landman

Hi folks:

  Using XMLRPC for some service method calls to make life 
easier/cleaner for some of our code.  I am doing something wrong, as I 
get errors (at the end).


  I set up a simple application using the usual methods

catalyst.pl RDB
cd RDB
script/rdb_create.pl controller Job

  I then set about to use portions of the examples in the 
Catalyst::Plugin::Server::XMLRPC .  Specifically I created a ping and 
echo method, to test.  I placed these in the Job.pm (rather than Root.pm 
... is this an issue?).  This is what they look like.



sub echo : XMLRPC { # available as: job.echo
my ( $self, $c, @args ) = @_;
$c-stash-{xmlrpc} = join ', ', @args;
$c-log-debug($args[0]);
}

sub ping : XMLRPCPath('/job/ping') {# available as: ping
my ( $self, $c ) = @_;
$c-stash-{xmlrpc} = 'Pong';
}

Ok.  Light up the server, comes up fine:

[EMAIL PROTECTED]:~/remote_db_access/RDB$ script/rdb_server.pl
[debug] Debug messages enabled
[debug] Loaded plugins:
..
| Catalyst::Plugin::ConfigLoader  0.14 
 |
| Catalyst::Plugin::Server  0.24 
 |
| Catalyst::Plugin::Server::XMLRPC 
 |
| Catalyst::Plugin::Static::Simple  0.17 
 |

''

...

[debug] Loaded Private actions:
.--+--+--.
| Private  | Class| Method 
 |

+--+--+--+
| /end | RDB::Controller::Root| end 
 |
| /job/ping| RDB::Controller::Job | ping 
 |
| /job/echo| RDB::Controller::Job | echo 
 |

'--+--+--'
...
[debug] Loaded XMLRPCPath Method actions:
.--+---.
| XMLRPCPath Method| Private 
   |

+--+---+
| job.echo | /job/echo 
   |
| job.ping | /job/ping 
   |

'--+---'


Now try the echo call:

[EMAIL PROTECTED]:~$ rpc_client -u http://localhost:3000/rpc -m /job/echo \
   abcd 123

I get this on the client side:

-Output---
$VAR1 = {
  'faultString' = 'Internal Server Error',
  'faultCode' = '500'
};


And I get this on the server side:

[info] RDB powered by Catalyst 5.7007
You can connect to your server at http://balto:3000
[info] *** Request 1 (0.011/s) [10821] [Sun Jul 22 23:05:27 2007] ***
[debug] POST request for rpc from 127.0.0.1
[debug] XML-RPC: Method called: /job/echo
[debug] Path is job/echo
[debug] abcd
[debug] XMLRPC 500 Errors:
Caught exception in RDB::Controller::Root-end 
Catalyst::Action::RenderView could not find a view to forward to.

[info] Request took 0.134054s (7.460/s)
.+---.
| Action | Time 
 |

++---+
| /job/echo  | 
0.000191s |
| /end   | 
0.001559s |

'+---'


Basically it is telling me that it doesn't have a view to forward to. 
Is this needed in Server::XMLRPC ?  I thought it did html encapsulated 
XML ... no view needed.


Any thoughts/clues?  Thanks.

Joe

--
Joe Landman
[EMAIL PROTECTED]


___
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/


[Catalyst] Using JQuery in Catalyst

2007-07-15 Thread Joe Landman

Hi folks:

  I am looking at using JQuery in a Cat app we are working on.  Using 
Mason for the View.


  Does anyone have a recommendation on the JQuery modules?  I tried 
them, specifically the JQuery::Tabs module and the Table module. 
Neither one emitted css/js by default.  Moreover, I could not convince 
them to emit the css or js.  I could get them to emit simple tables and 
simple bulleted lists, but that was about it.


  Are any Cat users using JQuery, and if so, are you doing it on your 
own, or leveraging the JQuery modules?  Basically I am looking at them 
as an easy way to avoid writing javascript/css for some of the 
presentation elements (tabs for example).  Basically I want to hand an 
object an appropriately constructed data structure and have it do all 
the work of generating the javascript.  I had thought the JQuery modules 
did this.


  Advice/guidance sought.

  Thanks.

Joe


--
Joe Landman
[EMAIL PROTECTED]

___
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] Using JQuery in Catalyst

2007-07-15 Thread Joe Landman
Replying to self after more experimentation.  I figured what I found 
might help others.


Joe Landman wrote:

  Are any Cat users using JQuery, and if so, are you doing it on your 
own, or leveraging the JQuery modules?  Basically I am looking at them 
as an easy way to avoid writing javascript/css for some of the 
presentation elements (tabs for example).  Basically I want to hand an 
object an appropriately constructed data structure and have it do all 
the work of generating the javascript.  I had thought the JQuery modules 
did this.


They sorta kinda do this. JQuery comes with the css/modules set up in 
directories of its own.  Of course, it is setup in such a way that if 
you follow the documentation, it won't work.


What you have to do is

cd to where ever you point jqueryDir to, then ...
ln -s /usr/lib/perl5/site_perl/5.8.8/JQuery/jquery_js/jquery \
jquery
ln -s /usr/lib/perl5/site_perl/5.8.8/JQuery/jquery_js/plugins \
plugins

This is just to set up the paths to the plugins.  You can cp -r instead 
if you want to incorporate them.


Then in your code, you need to add

my $code = $jquery-get_jquery_code ;
my $css  = $jquery-get_css ;

and then somewhere before the body ends ...

% $code %
% $css  %

( for the TT/TT2 enhanced/encumbered, this should be something like
[% $code %]
[% $css  %]
  or some such thing )

Also the example on the JQuery module page is incorrect, you need to add 
in a

addToJQuery = $jquery ,

element.  Kind of a pseudo class/object thingy.  Not one and not the 
other.  Something in-between.


I will document what I found and send a ticket over to Peter Gordon 
soon.  Is there a JQuery plugin or similar being worked on for Catalyst?


Thanks

Joe

--
Joe Landman
[EMAIL PROTECTED]

___
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] TT2 + CP::Authentication + DBIC gotcha

2007-07-13 Thread Joe Landman

Perrin Harkins wrote:

On 7/13/07, J. Shirley [EMAIL PROTECTED] wrote:

As anecdotal evidence to its insidious behavior, I've personally been
involved in a 5 man debugging effort that took 13 days (not full days,
but probably an average of 3-4 hours a day * 5 people * 13 days) to
finally find the bug.  Which was simply my $foo = $bar if $baz;

The reason why it was so hard to track down was because ot he
wonderful undefined behavior.


I had a similar experience, which is why I always mention when I see
it in other people's code now.  It's a real problem and very hard to
track down if you haven't heard of it before.


[disclaimer:  not a paid spokesmodel ... ]

A while ago, I tossed a code that did things like that into Komodo.  I 
set a break point after the my $variable = expression if (condition); 
line and didn't see the $variable in the list.  I went back to look at 
the condition, and realized what happened.


Nowadays I simply put all the variable creation in a separate section 
near the beginning.



 Joe

--

[EMAIL PROTECTED]


___
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] A View that may include elements optionally returnedfrom other funcs

2007-04-25 Thread Joe Landman
On Wed, 25 Apr 2007 11:58:02 +0100, Carl Johnstone wrote
  Ugh...   Assume that the view gets everything from controller.  Then this 
  controller is the thing that should gather everything together before 
  shipping it to the view.  Let the template decide the form, let the 
  controller decide the content.
 
 That's fair enough, but say you've got 20 possible page elements of 
 which typically 5 or 6 are included in the final page. Would you 
 still suggest that the Controller should initialize any data for all 
 20 elements onto the stash?

Absolutely not.  On the contrary, I specifically indicated that blank sections
should be left undef.  If the stash for that section is undef, then the view
can completely (programmatically) skip that section.

 
 What if some of those elements are relatively expensive to generate?

See above, and please refer to my original note.

 
 What Steve wants is some way of being able to decide in the View 
 which of those elements are included and load them accordingly.

... and this should be done at the controller level is what I am saying.  You
can even have your controller select a particular view based upon the
available data if you wish.  Or have a single view template handle everything
(and only render bits that are defined, which is what I had indicated, this
way you do not have to construct everything, just what you need).

 
 The best solution I can come up with is passing coderefs into your 
 view which can then be run to retrieve the data would something like 
 this work?
 
 $c-stash-{'get_most_popular'} = sub {
   return $c-model('DB')-some_expensive_db_op();
 };

Maybe I am confused about MVC, but wouldn't you want the view to decide how to
present what is sent to it by the controller, and hence have the controller
handle this?

 
 Carl
 
 ___
 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/


--
Scalable Informatics LLC
http://www.scalableinformatics.com
phone: +1 734 786 8423


___
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] C::C::FB and captchas or similar

2007-03-19 Thread Joe Landman


Octavian Rasnita wrote:
 From: Joe Landman [EMAIL PROTECTED]
 
 Hi folks:

  Two part question.  Has anyone played with captchas in conjunction
 with C::C::FB?  Second part:  should I be looking at different
 technology rather than captchas?
 
 I have no idea if there are other perl modules that can replace Captcha,
 but I have seen some pages that use to put some questions that should be
 answered. There were simple questions that can be understood by anyone.

Understood.  Ask a complex problem spelled out in a sentence that even
if a bot could parse, it still could not understand and answer (that
is, until the singularity :) ).

Localizing this could be hard, as the world doesn't necessarily speak
english.  It would need to be some sort of elementary mathematical
problem, requiring a typed answer.

 It is very good to avoid using Captcha, for following World Wide Web
 Consortium recommendations, and for making your pages accessible for the
 blind also, because the screen readers cannot recognize the text from
 those images.

Hmmm... I haven't been focusing on this, but it is worth a read.  I am
working on making the pages as simple as possible (no AJAXian-ness) for
a combination of aesthetic and personal time reasons.  Any pointers to
document design elements to encourage accessibility you can provide
would be appreciated.

 If you still want to use Captcha, it would be also nice to offer an
 alternative solution, also presenting a .wav file with those letters
 spoken.

Now thats a really interesting captcha ...  using audio ...  wouldn't
work for deaf readers though.  But your point is well taken.  Don't make
it harder than it needs to be.  Make the test more useful by segregating
machinations of the test, from the cognitive process and response.
Since blind and deaf users, and pretty much all users, have the
capability to enter keyboard (or keyboard like) response, and all should
be able to read text from the test, keep it simple, and text based.

Thanks, will think about this.  Have some ideas already.

Joe

 
 Octavian

-- 
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615

___
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] creating binaries

2007-01-17 Thread Joe Landman

Bogdan Lucaciu wrote:

On Wednesday 17 January 2007 10:49, Octavian Rasnita wrote:

Bla bla. You are living in USA probably, where what you said is not bla


[...]

this is what some people refer to as trolling. (High quality trolling even) 


Yup.  Took me until I read that response from Octavian to realize it. 
My apologies to the list.  I thought I was genuinely helping someone.


Please end this thread, or at least try to keep legal/marketing/philosophy out 
of it. 




--

Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615


___
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] creating binaries

2007-01-16 Thread Joe Landman

Octavian Rasnita wrote:

From: [EMAIL PROTECTED]

Take a look at /tmp/pdk/ perlapp exes dump the plaintext while running.
This is not a problem with Catalyst,  perl is an interpreted 
language not
a compiled one.  perlapp is there to make distributing self contained 
perl

applications easier,  not to protect your source.


perlapp doesn't drop the source code in /tmp. It puts there only some 
.dll files, and nothing more than that.

(I am using perl Dev Kit 6.02, but now PDK 7 was just released).


The source needs to be obtained somehow and in some state for the Perl 
 program to handle it.



Can the source code be got easily from those dll files?
If it cannot be found easily, then I think it would be nice if the 
Catalyst applications could be deployed using perlapp.


Once your program is loaded, and compiled into object/internal 
representation form in memory, the memory could be forced to disk 
somehow, and a creative hacker can reasonably reassemble your code.


That is unless you have your in-memory image also encrypted with on the 
fly decryption/execution.  I am not aware of any one doing this for any 
language.  Though I could be wrong.


If a language is interpreted, this doesn't mean that the programs that 
were made with it cannot be protected in any way.


Define protection.  Do you mean not copied/looked at/altered ?


Or, is there another way of protecting the code from a Catalyst app?


Yes.  Never deliver the application.  Host the critical bits.  Have them 
make SOAP/XML-RPC calls back to your machine.


Note:  this is not exclusive to Catalyst.  This is true with every/any 
MVC framework, and pretty much every language, compiled or otherwise.




Thanks.

Octavian



___
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/



--

Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615


___
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] creating binaries

2007-01-16 Thread Joe Landman

Octavian Rasnita wrote:

From: Joe Landman [EMAIL PROTECTED]

perlapp doesn't drop the source code in /tmp. It puts there only some 
.dll files, and nothing more than that.

(I am using perl Dev Kit 6.02, but now PDK 7 was just released).


The source needs to be obtained somehow and in some state for the 
Perl program to handle it.


Oh yes I know that, but if it would be too hard to get that code, most 
users would prefer to pay for the program instead of cracking it.


Technological measures can be defeated.  Assume they provide speed bumps 
at most to determined hackers.


We have found that people are (sometimes) willing to pay for programs 
when they add significant value to what it is they are doing.  That 
said, much of the reason we see our customers interested in open source 
has very little to do with libre' and a great deal to do with 
acquisition cost.  The often higher quality is an added benefit.


What stops them from doing un-intended things with it are good licenses 
that grant them the rights they require without granting them the rights 
they do not require.  You are not granting ownership rights, you grant 
usage rights.


You may chose to restrict these rights, or not grant them at all.  In 
this case, you may need to review which elements of OSS you may yourself 
use in your program.



Can the source code be got easily from those dll files?
If it cannot be found easily, then I think it would be nice if the 
Catalyst applications could be deployed using perlapp.


Once your program is loaded, and compiled into object/internal 
representation form in memory, the memory could be forced to disk 
somehow, and a creative hacker can reasonably reassemble your code.


That is unless you have your in-memory image also encrypted with on 
the fly decryption/execution.  I am not aware of any one doing this 
for any language.  Though I could be wrong.


As far as I know in the latest versions of perlapp, the source code is 
kept in memory and it is also crypted.
That decryption might be done, but it would be much harder, and again, 
most users will prefer paying for the program instead of fighting with 
it for breaking the protection.


I have not seen many users, who have a day job that requires that the 
get specific work done, try to crack program source code, or reverse 
engineer their apps.  It all comes down to the value you offer, and what 
you are willing to enable.


Protection has its purposes, though compiling programs is not what I 
would call protection.  If you want to protect you need to mix 
encryption with some sort of preventative execution measure, a DRM of 
sorts.  This provides something akin to a higher speedbump, but it is 
only a speedbump.  It is not absolute protection.  The only way to get 
better protection is to never ship the application, only the side 
effects.  Google doesn't ship its applications, though they are some of 
the most widely used in the world.  I am willing to be that the critical 
internal bits are not OSS.




If a language is interpreted, this doesn't mean that the programs 
that were made with it cannot be protected in any way.


Define protection.  Do you mean not copied/looked at/altered ?


Ok, thanks for asking this, because each one of us understand something 
different.
By protection I understand that if someone would like to get the source 
code of the program, that person should be a pretty good programmer, and 
he should spend a long time trying to get it. How much time? Well, a 
time that doesn't cost more than $90.


Hmmm So you think they should spend at least $90US of time to get 
the program from the internal representation?


So do you know about B::Deparse?

I would suggest reflecting upon which goals you have in preventing 
access to source.  Is it prevention of modification, protection of IP, 
restriction of redistribution ...


But I don't know if I understood correctly... from this discussion I 
think that it is not possible to do what I want using Catalyst.


This has nothing to do with Catalyst.  This is (not really) a language 
issue, and more correctly a basic computing issue.  Unless your code is 
always encrypted, in memory, on disk, etc. there is little possibility 
to prevent a determined hacker from getting it.  So if you take this off 
the plate, that is, you make it so that getting at the source is not 
hard at all, you effectively remove that attack vector against your 
code.  Now focus upon what it is you do.  Heck, you can even hide your 
IP back behind a nice XML-RPC/SOAP stack on a remote system or three, 
and distribute the rest as OSS.


I have also tried an HTTP server module from cpan that works with 
CGI::Application, but that module cannot be installed under Windows.


Ok, the issue sounds like windows.  I don't want to comment on its 
support as I don't use it for this.  We use Linux for our work, all of 
this works just fine.


FWIW: I have tried recent Catalyst under Cygwin (www.cygwin.com

[Catalyst] deployment how to question ...

2007-01-10 Thread Joe Landman

Hi folks:

  I want to deploy a site as a virtual named host in apache (1.3.xx for 
various reasons).  There seems to be lots of pointers to FCGI as a way 
to hook the apache system into the application.


  This looks like a good idea.  I would like to do this.  Yet when I 
try to set up fcgi, it looks like I can't put those in virtual host 
containers.  Is this correct?  If not, could you point me in the right 
direction?


  Thanks.

Joe

--

Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615


___
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] IMPORTANT: Catalyst::Plugin::FormBuilder obsoleted by ::Controller::FormBuilder

2007-01-02 Thread Joe Landman

Daniel McBrearty wrote:

is there any way that this info can somehow find its way onto the
perldoc ? in big letters at the top ... ?


Might be a good thing to have an MODULES_CURRENT/MODULES_OBSOLETE list, 
or ask the module authors to simply note the obsolescence in an updated POD.


--

Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615


___
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/


[Catalyst] C::P::FormBuilder question/problem

2006-12-30 Thread Joe Landman
Hi folks:

  I want to stop building my own forms and use one of the C::P modules.
 FormBuilder looked quite good.

  I (largely) followed the example in the manual.  I am trying to build
a login web form for an app.  Unfortunately something isn't quite
working.  I see nothing (e.g. zero) output from the call, though it
looks like from the log, that things are working.  Am I missing
something obvious here?  The man pages suggest that this should work ...
 (note:  I can call $c-form-render and send it to the log file).  I am
using Mason for the view, and a simple SQLite3 DB for the model.

My login.fb looks like this:

# Form config file root/forms/books/edit.fb
name: login_form
method: post
fields:
username:
label: User name
type:  text
size:  40
required: 1
password:
label: Password
type:  password
size:  40
validate: NAME
required: 1

submit: Login
reset:  Clear

My Root.pm controller has this in it

sub login : Local Form {
 my ($self, $c) = @_;
 my $form;
 $c-log-debug(In login\n);
 if ($c-form-submitted  $c-form-validate)
  {
   $c-forward('/login_check') ;
  }
 $c-log-debug(leaving login\n);
 }

When tested without the login method, it generates output properly,
specifically the Catalyst default page (haven't changed it, in order to
keep sanity checks while building this)

When tested with the login method, it generates no output whatsoever.
The log shows this:

[info] SI powered by Catalyst 5.7006
You can connect to your server at
http://crunch-r.scalableinformatics.com:3000
[CGI::FormBuilder::Messages::new] (debug1) creating Messages object from
(default)
[CGI::FormBuilder::new] (debug1) creating fields list
[CGI::FormBuilder::new] (debug2) assuming fields list from ARRAY
[CGI::FormBuilder::new_field] (debug1) called $form-new_field(username)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args-{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args-{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args-{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args-{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field username
[CGI::FormBuilder::new] (debug2) push @(), username
[CGI::FormBuilder::new_field] (debug1) called $form-new_field(password)
[CGI::FormBuilder::new_field] (debug2) rearrange: $args-{cleanopts} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args-{sticky} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args-{selectname} = 1;
[CGI::FormBuilder::new_field] (debug2) rearrange: $args-{selectnum} = 5;
[CGI::FormBuilder::new_field] (debug1) created field password
[CGI::FormBuilder::new] (debug2) push @(username), password
[CGI::FormBuilder::new] (debug1) field creation done, list = (username
password)
[info] *** Request 1 (0.143/s) [23620] [Sat Dec 30 17:07:09 2006] ***
[debug] GET request for login from 192.168.1.10
[debug] Path is login
[debug] Form (login): Set action to /login
[debug] Form (login): Looking for config file login.fb
[debug] Form (login): Found form config /srv/sites/sc/SI/root/forms/login.fb
[debug] Form (login): Calling FormBuilder-new to create form
[debug] In login
[debug] leaving login
[info] Request took 0.028199s (35.462/s)
.+---.
| Action | Time
 |
++---+
| /login |
0.000326s |
'+---'

Thanks.

Joe


-- 
Joe Landman
landman |at| scalableinformatics |dot| com

___
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/


[Catalyst] Solved (mostly) the display problem, still fighting for FormBuilder

2006-12-30 Thread Joe Landman
In my zeal to code up the application I managed to delete the RenderView
bit.  You know, the one line that reads:

sub end : ActionClass('RenderView') {}

in the root controller.

Replacing that immediately fixed the display problem, though now I am
back to the FormBuilder issue.  I am having a problem with some of the
documentation (will file a bug against what I found).  The docs suggest
something that looks like this (in TT, I hand converted this to Mason).

 [% FOREACH field IN form.fields %]
div id=[%- field.name -%]
  div class=label
[% field.required
  ? qq(span class=required$field.label/span)
  : field.label
%]
  /div

This presumes that $c-form-fields is the correct array ref to iterate
over.  As I have discovered, it is not.  It is $c-form-fieldrefs.  So
my Mason code looks something like this:

% foreach $field (keys %{$form-{fieldrefs}})
% {
  % $field |h %
% }

and it spit out my username and password fields quite nicely.  By
Data::Dumping the form, I saw this:

 'fieldrefs' = {
   'password' = bless( {
  '_cache' = {
'type' 
 = 'text'
  },
  'cleanopts' = 1,
  'selectname' = 1,
  'sticky' = 1,
  'name' = 'password',
  '_form' = $VAR1,
  'selectnum' = 5
}, 
 'CGI::FormBuilder::Field::text' ),
   'username' = bless( {
  '_cache' = {
'type' 
 = 'text'
  },
  'cleanopts' = 1,
  'submit' = 'Login',
  'name' = 'username',
  'size' = '40',
  'password' = 
 $VAR1-{'fieldopts'}{'username'}{'password'},
  'selectname' = 1,
  'sticky' = 1,
  'required' = '1',
  '_form' = $VAR1,
  'label' = 'User 
 name',
  'type' = 'text',
  'selectnum' = 5
}, 
 'CGI::FormBuilder::Field::text' )

which suggests that the correct dereference for the [%- field.name -%]
like things is actually

$form-{fieldrefs}-{$field}-{name}

Has anyone else seen this?  Or does TT work in some magical other manner
so it hides all of this from us?

Where I am now is that a call to $form-render  doesn't seem to do much.
 Will work on it some more, I am assuming I have some additional pilot
error here as well.

Thanks.


-- 
Joe Landman
landman |at| scalableinformatics |dot| com

___
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/


[Catalyst] Solved FormBuilder

2006-12-30 Thread Joe Landman
FormBuilder now responds as I want it to.  I needed to have

% $form-render %

rather than

% $form-render;

Ok, now to tune and tweak the display.


-- 
Joe Landman
landman |at| scalableinformatics |dot| com

___
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] VMware Image

2006-12-20 Thread Joe Landman

Rhett Creighton wrote:
Is anyone working on a vmware image for Catalyst like the docs say?  I'm 


Yes.  Linux based, OpenSuSE specifically.  Running into issues with 
their Perl.


starting to make one for myself, maybe with damn small linux.  Though, 
I've never done this before.  Let me know if anyone has suggestion, or 
wants to help, or already did this.


Rhett


___
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/



--

Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615


___
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] Re: template comparison

2006-10-29 Thread Joe Landman



Jon Warbrick wrote:

On Sun, 29 Oct 2006, Hermida, Leandro wrote:


I seem to be leaning on the side of Mason so far ...


If considering Mason as a templating language for Catalyst, it's worth
looking at Text::MicroMason (and Catalyst::View::MicroMason). _Almost_ the
same syntax as HTML::Mason but fewer prerequisites (in particular not
requiring mod_perl) which makes installs for developers a bit easier. The


The latest HTML::Mason does not require mod_perl.  I haven't tried 
MicroMason yet.




--
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452
cell : +1 734 612 4615

___
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] catalyst++

2006-09-29 Thread Joe Landman
Hi Thomas:

  When I looked at InstantCrud, it only worked with TT, and I want to
use it with Mason.  Is there a way to do this?

Joe

Thomas Hartman wrote:
 similar idea to InstantCrud, isn't this?
 
 2006/9/29, Harshal Shah [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]:
 
 Hi friends,
 
 Catalyst is so far the best framework I have found to make web based
 applications (ruby is there ..but perl is god) .
 
 I've been toying around with catalyst for couple of months and made
 few web based applications using catalyst. I realized that all web
 applications have few common set of features.
 
 Basically i ended up duplicating quite a bit of stuff within each
 app and across also. Point is ..it would be really nice to jump
 start catalyst. for instance, catalyst.pl MyApp should be much
 more than empty framework.
 
 I know people have their own choice of each component and
 module..but having basic set of components built-in would be
 certainly nice to have. Everyone may night need this solution .but
 for people who want to rapidly start deploying..this will be a boon.
 
 currently i am working on it to include :
 
1. Basic Authentication and authorization (User and role tables )
   based on DBIx::Class
2. Front end CSS/Jquery based menu system.
3. CRUD for user  role tables, db schema can be used to generate
   necessary forms  layouts.
4. Basic javascript based form validation (again schema can be
   used here)
5. and more ...
 
 I know these things are very user/developer/application specific,
 but also common components across most web based application.
 
 Is something like this already available or in making ?
 
 Can it be more generic ?
 
 
 
 -- 
 Harshal Shah
 ___
 List: Catalyst@lists.rawmode.org mailto:Catalyst@lists.rawmode.org
 Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
 Searchable archive:
 http://www.mail-archive.com/catalyst@lists.rawmode.org/
 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/

-- 
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: [EMAIL PROTECTED]
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615

___
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] how to get started?

2006-08-21 Thread Joe Landman
Chisel Wright wrote:
 On Mon, Aug 21, 2006 at 08:08:19AM -0700, Steve Atkins wrote:
 Task::Catalyst is completely broken.
 
 Just out of interest, in what way?
 

Incorrect (as in old) version numbers, missing prerequisites somewhere 
in the chain, dependency upon modules which aren't common that don't 
build particularly cleanly/correctly on any of the 3 OSes I have tried 
(Linux, Solaris, Windows), ...

Cat-in-a-box and related efforts are good.  I have a badly out of date 
make file to handle this, going to give that up in favor of mirroring 
CPAN locally, and just building what is needed.

FWIW, anything like DBIx::* that doesn't have an explicit dependence 
upon DBI, just as an example, not pointing a finger at DBIx::* or DBI, 
has a tendency to break, spectacularly, during testing.

Huge dependency radii/trees are not fun.

-- 

Joe Landman
landman _at_ scalableinformatics _dot_ com


___
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/


[Catalyst] Static file serving question

2006-08-14 Thread Joe Landman
From
http://search.cpan.org/~mramberg/Catalyst-Plugin-Static-Simple-0.14/lib/Catalyst/Plugin/Static/Simple.pm

it seems that for me to have a path /files served statically I need to
add something like this in my root

MyApp-config-{static}-{include_path} = [
'/files',
MyApp-config-{root}
];

Then any file in /files will be served statically without Catalyst
working its magic.

So far so good.

Now suppose I have a large set of directories, which may also be deep
under /files, and would not be able to enumerate them at server startup
time.  Do I need to add each directory to this include path, or is the
upper include path, /files sufficient?  From the text, I think it might
be sufficient for /files, but I would like to be sure.

That is, I have

/files
/files/a
/files/b
/files/b/x
/files/b/y
...

and I want to make sure I can serve everything under and including
/files if I use /files in the include_path directive.

Thanks.

-- 
Joe Landman
landman |at| scalableinformatics |dot| com

___
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/


[Catalyst] simple question ... I think ...

2006-08-13 Thread Joe Landman
Ok, being stupid today

I have a simple controller named directory.  It has a default method.
So things named

http://localhost:3000/directory

should go to it.  Now I want to capture

http://localhost:3000/directory/other/things/...

that is, I want this controller to handle anything past the default
method.  It does this by default.  My question is, how do I get access
to the rest of the path after /directory?  This is what I have ...

sub default : Regex('^(.*)$') {
my ( $self, $c, $rest ) = @_;
...

}

and I want $rest to be /other/things/...

This is not working though.  I tried a Path('/directory') that worked,
as long as I gave it /directory/other.  As soon as I tried
/directory/other/things, it gave me /directory/other.

Hmmm...

Hints?  Clues?  FAQs?  Pointers?

Thanks!


-- 
Joe Landman
landman |at| scalableinformatics |dot| com

___
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] simple question ... I think ...

2006-08-13 Thread Joe Landman
Solution... see below ...

Matt S Trout wrote:
 Joe Landman wrote:
 Ok, being stupid today

 I have a simple controller named directory.  It has a default method.
 So things named

 http://localhost:3000/directory

 should go to it.  Now I want to capture

 http://localhost:3000/directory/other/things/...

 that is, I want this controller to handle anything past the default
 method.  It does this by default.  My question is, how do I get access
 to the rest of the path after /directory?  This is what I have ...

 sub default : Regex('^(.*)$') {
 my ( $self, $c, $rest ) = @_;
 ...

 }
 
 sub base :Path {
 ...
 }
 
 and I want $rest to be /other/things/...

 This is not working though.  I tried a Path('/directory') that worked,
 as long as I gave it /directory/other.  As soon as I tried
 /directory/other/things, it gave me /directory/other.
 
 sub other :Local :Args(0) { ... }
 
 so /directory/other only is matched by that method
 
 Hmmm...

 Hints?  Clues?  FAQs?  Pointers?
 
 Catalyst::Manual::Intro has been improved for 5.70 and explains the
 attrs better now.

The hint I needed was that the regex'es are passed in via
$c-request-snippets.  This controller definition works nicely.

sub base : Regex('^directory(.*)$') {
my ( $self, $c ) = @_;
my ($rest);

$rest   = @{$c-request-snippets}[0];

}

Would localregex eliminate the need to hardwire the directory in
there?  Will play with this...

Thanks.
-- 
Joe Landman
landman |at| scalableinformatics |dot| com

___
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] simple question ... I think ...

2006-08-13 Thread Joe Landman


Matt S Trout wrote:

 Yes, but you still don't need to use a regex action.
 
 sub base :Path {
  my ($self, $c, @parts) = @_;
  my $rest = join('/', @parts);
  ...
 }
 
 If you're using a Regex action, always first ask yourself is there an
 easier way to do this?. The answer is almost always yes.

heh... make it as simple as possible, but no simpler.  Thanks!  This is
exactly what I was looking/hoping for.  Works like a charm.  Didn't see
it expressed in the docs/faqs though.

-- 
Joe Landman
landman |at| scalableinformatics |dot| com

___
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/


[Catalyst] quick windows catinabox question

2006-08-09 Thread Joe Landman
Hi folks:

   I want to be able to work on my stuff regardless of whether I am 
booted into windows or linux on my laptop.  Most of the time is spent in 
Linux, but I need to use windows for some things every now and then.

   I have Catalyst operational on the laptop under SuSE 10.1.  Works 
great.  However, I want to also run it under windows so I can work on 
the same projects in shared directories when in windows.

   Last I tried, Cygwin had some issues (Matt had been wrestling with 
it).  Is Catinabox working in Cygwin, or will everything just work in 
Cygwin?  Native vs cygwin doesn't matter.

   Thanks.


-- 
Joe Landman
[EMAIL PROTECTED]

___
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/