Re: [Catalyst] About output in a browser

2007-08-29 Thread lanas
 prints neatly, every line of the directory listing on a separate line
 in the browser:
 
 sub getFiles()
 {
   my ( $self, $c ) = @_;
   print getFiles() !;
   @{$c-stash-{files}} = `ls -l /home/frodo/`;
 }

It looks like adding a print statement will throw the output into
literal mode of some sort.  Anyhow, that's not how the output should be
made, since a view should be used and at least a minimal tt file.  When
I chomp the directory lines otained with 'ls -l' and use a simple tt
file using pre and a view, everything is fine.  But if I add a print
statement in the model's method, then even the pre tags are shown in
the browser.

So since I learn Catalyst and I should be using views, then this
behaviour of a print statement is not very important.

Cheers,
Al

___
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] Trying ircxory

2007-08-28 Thread lanas
Hi,

  ircxory needs the following:

Catalyst::Plugin::Authentication::Credential::OpenID ...missing. (would
need 0.03)

But on the CPAN there's only 0.02.  Where is the newest version
available or, is there another way ? - Thanks.

Cheers,
Al

___
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] About output in a browser

2007-08-28 Thread lanas
Hi folks,

  In understanding how Catalyst work and how to work with , I'm making
very simple stuff, like having a model that only returns a directory
listing.  I found something curious before starting to make a view.
Every line of the directory listing, obtained with 'ls -l', will be
chomped if I do not put a print String ! just before it in the
model, like this:

prints chomped lines, which results in unstructured output in the
browser:

MyApp01/lib/MyApp01/Model/MyApp01Model.pm

sub getFiles()
{
  my ( $self, $c ) = @_;
  @{$c-stash-{files}} = `ls -l /home/user/`;
}

prints neatly, every line of the directory listing on a separate line
in the browser:

sub getFiles()
{
  my ( $self, $c ) = @_;
  print getFiles() !;
  @{$c-stash-{files}} = `ls -l /home/frodo/`;
}

'getFiles()!' will also get printed in the browser, but I presume this
is OK.

The output is in the following.  There are no view defined at the
moment.

MyApp01/lib/MyApp01/Controller/Root.pm

sub end : ActionClass('RenderView') 
{
  my ( $self, $c ) = @_;

  if (defined $c-stash-{files}) {
$c-response-body( @{$c-stash-{files}} )
  }
else {
  $c-response-body(NO DATA !);
}
}

Can someone tell me why the output of the directory listing is not the
same due to, apparently, the poresence of a print statement ?


Al


___
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] FC6 x86_64: problem locating Class/DBI/SQLite.pm

2007-08-26 Thread lanas
Hello,

  I'm new to Catalyst and am trying to follow the example shown on
perl.com ('Catalyst' By Jesse Sheidlower, June 02, 2005) and there's a
problem at the beginning, when running the minimjojo_create.pl helper:

Couldn't require loader class Class::DBI::Loader::SQLite, Can't
locate Class/DBI/SQLite.pm in @INC (@INC contains:
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi [snip all
paths]

  And then, I do:

cpan -i Class::DBI::Loader::SQLite
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Sun, 26 Aug 2007 09:36:43 GMT
Class::DBI::Loader::SQLite is up to date.

  Look svery much like the module is installed.  Shouldn't the helper
then see and use it ?

Thanks,
Al

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