Re: [Catalyst] complex search using Catalyst::Controller::DBIC::API::REST

2017-04-04 Thread Hartmaier Alexander
Have you tried using the search parameter with JSON encoded parameters 
as suggested before?


DBI::API doesn't guess if the search parameter you've provided is a 
column name or a db function.


Best regards, Alex


On 2017-03-28 18:58, Rajesh Kumar Mallah wrote:

Hi ,

Thanks for the response.

(1) The HTTP Request is:

/api/rest/general/members?list_returns=holder1_balance(member_id)=21

(2) controller config is:   https://pastebin.com/2iT1YSPm


Error log:

[2017/03/28 22:22:44]- API.pm-290: ERROR
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
execute failed: ERROR:  schema "me" does not exist [for Statement "SELECT
me.holder1 FROM general.members me WHERE ( ( me.member_balance(member_id)
= ? AND me.society_id = ? ) ) ORDER BY member_id" with ParamValues:
1='21', 2='50']


Regds
Mallah.


Hi,

please include your controller config and the http call.

Best regards, Alex


On 2017-03-19 04:49, Rajesh Kumar Mallah wrote:

Hi ,

Including member_balance(member_id) in 'search_exposes' config param
did help to proceed to some extent , but the function is being
prefixed by the table alias whereas it should be left alone.

eg:


   search_exposes => [
  qw/member_balance(member_id)/,
  
  . . . . .
  ],);


produces following invalid SQL note: member_balance is prefixed by
'me' .


ERROR DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception:
DBD::Pg::st execute failed: ERROR:  schema "me" does not exist [for
Statement

"SELECT me.holder1 FROM general.members me WHERE ( (
me.member_balance(member_id) = ? AND me.society_id = ? ) ) ORDER BY
member_id" with ParamValues: 1='21', 2='50']


Any help is appreciated.

regds
mallah.


Hi ,

How to perform below search:

select member_id,holder1 from general.members where
   member_balance(member_id , '2017-03-14') < 0 ;

there is a function on LHS of the condition

Regds
Mallah.







Hello Rajesh,

C::C::DBIC::API supports that under the hood, so not sure what are you
going after.

You can either use: search=JSON.stringify(object) or construct the
search
passing params like: search.holder.-ilike=%mis%. Both should work out
of
the box.

Regards

On Wed, Mar 1, 2017 at 10:24 AM, Rajesh Kumar Mallah

wrote:


Hi ,

CGI::Expand collapse_hash comes to rescue ,
below is a small snippet that converts the perl
hash reference to the TT's dotted format using
CGI::Expand.



#!/usr/bin/perl -w

use strict;

use CGI::Expand qw(expand_hash  collapse_hash);
use Data::Dumper;
use JSON::XS;
use URI::Escape;


# SQL::Abstract Syntax comes here.
my $where  = {
 search => {
holder1 => { -ilike => '%mis%' },
mobile1 => { -ilike => '%967%' },
flat_no => 'A203'
  }
} ;



my $flat_hash = collapse_hash( $where );

print  join '&' ,   map { my $k = $_; my $v = uri_escape(
$flat_hash->{$k})  ; "$k=$v"   } keys %{$flat_hash};

print "\n";
==

Output:


$VAR1 = {
'search.mobile1.-ilike' => '%967%',
'search.holder1.-ilike' => '%mis%',
'search.flat_no' => 'A203'
  };
search.mobile1.-ilike=%25967%25=%
25mis%25_no=A203



Regds
Mallah.





Hi ,

In continuation of previous query kindly guide how to do a
anchored or unanchored ilike search using
Catalyst::Controller::DBIC::API::REST


I have used DBIC search with lots of search conditions in past
that uses SQL::Abstract, at this moment I need a guide(document)
on how to convert SQL::Abstract's conventions to Query parameter
format


Eg:


   http://10.100.102.38:3000/api/rest/general/members?list_
returns=holder1_count=10

Returns:

{
"Result": "OK",
"Records": [
  {
"holder1": "Sh. R. Krishna Kumar"
  },
  {
"holder1": "Sh. Sharad Kumar Srivastava"
  },
  {
"holder1": "Smt. Shubhra Jain ."
  },
  {
"holder1": "Sh. Balam Singh Negi"
  },
  {
"holder1": "Sh. Subodh Jain"
  },
  {
"holder1": "Smt. Punita Batra"
  },
  {
"holder1": "Sh.K C Sardana"
  },
  {
"holder1": "Smt. Sunita Mishra"
  },
  {
"holder1": "Sh. Vijay Kumar Khanna"
  },
  {
"holder1": "Smt. Daisy Tyagi"
  }
]
}


I need a Query param that would return all holder1 matching
Mis. ie holder1 ilike '%Mis%'


As always Thanks in anticipation of your valuable time/attention.


Regds
Mallah.





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





___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable 

Re: [Catalyst] Paging support in Catalyst::Controller::DBIC::API

2017-03-23 Thread Hartmaier Alexander

Hi,

it does return it in the totalcount property by default.

The name can be configured with the 'total_entries_arg' config parameter: 
https://metacpan.org/pod/Catalyst::Controller::DBIC::API#count_arg,-page_arg,-select_arg,-search_arg,-grouped_by_arg,-ordered_by_arg,-prefetch_arg,-as_arg,-total_entries_arg

Best regards, Alex

On 2017-03-19 18:38, Dimitar Petrov wrote:
Hello Rajesh,

I usually have my own: MyApp::REST which extends

package MyApp::REST;
use Moose;
use Try::Tiny;
use DBIx::Class::ResultSet::RecursiveUpdate;
use Scalar::Util qw( reftype );

BEGIN { extends 'Catalyst::Controller::DBIC::API::REST' }

with 'Iris::Web::TraitFor::Controller::Datatables';

….

and later on modifier:


=head2 list_format_output

Add more information about current search

=cut

after 'list_format_output' => sub {
 my ($self, $c) = @_;

 if (!$self->has_errors($c) && $c->req->has_search_total_entries) {
   my $current_result_set = $c->req->current_result_set;

   $c->stash->{ $self->stash_key }{last_page}= 
$current_result_set->pager->last_page + 0;
   $c->stash->{ $self->stash_key }{current_page} = 
$current_result_set->pager->current_page + 0;
   $c->stash->{ $self->stash_key }{entries_per_page} = 
$current_result_set->pager->entries_per_page + 0;
   $c->stash->{ $self->stash_key }{entries_on_this_page} = 
$current_result_set->pager->entries_on_this_page + 0;
 }
};

Best regards,


On Mar 19, 2017, at 09:28, Rajesh Kumar Mallah 
> wrote:

Hi ,

We know that Catalyst::Controller::DBIC::API supports paging
via list_count  , list_page and list_offset  options and
its possible to fetch a page of a large result set.

However what it does not seems to support is to tell
the View(caller) of how many records in total exists , ie
the total_entries of the Data::Page object.

This compels us to make two queries one to get the total count
and another to get the paged result.

Does this feature really does not exists or am I missing something?

(The reason I love and thoroughly use Catalyst::Controller::DBIC::API is
that it allows me to be lazy :p )

regds
Rajesh Kumar Mallah.




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




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




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] JSONP support Catalyst::Controller::DBIC::API

2017-03-17 Thread Hartmaier Alexander

If someone wants JSONP support, yes.

Best regards, Alex


On 2017-03-16 18:07, Rajesh Kumar Mallah wrote:




Ok are you suggesting DBIC::API needs to be enhanced for
JSONP support ?


Regds
Mallah.


Looks like a code injection attack vector to me...

Patch + Tests for DBIC::API welcome!


On 2017-03-09 11:05, Rajesh Kumar Mallah wrote:



For the time being i have modified and solved my issue as below:

sub end : Private {
   my ( $self, $c ) = @_;

   ##
   # code for manipulating stash here
   ##

   $c->forward('serialize');

   my $cb = $c->request->params->{callback} ;

   if ($cb) {
   my $body = \$c->res->body;
   $$body = "$cb ($$body);";
   $c->res->body($$body);
   }

}


regds
mallah.



Hi ,

How to get JSON response body wrapped in a callback function
call (a.k.a JSONP) when using Catalyst::Controller::DBIC::API::REST

I use Catalyst::Controller::DBIC::API and 'end' function
in ControllerBase is like below:

sub end : Private {
  my ( $self, $c ) = @_;

  ##
   # code for manipulating stash here
  ##

  $c->forward('serialize');
}

=
In   Catalyst/Controller/DBIC/API.pm

# from Catalyst::Action::Serialize
sub serialize : ActionClass('Serialize') { }

=


My other JSON responses which are rendered via MyApp::View::JSON
can be modified as JSONP compatible as i have below in my App config

__PACKAGE__->config({
'View::JSON' => {
allow_callback  => 1,# defaults to 0
},
});


===


The problem is only with automatically generated rest endpoints
from  Catalyst::Controller::DBIC::API.

Thanks in anticipation.


Regds
mallah.





















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





  *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b


  *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

Notice: This e-mail contains information that is confidential and may be
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.


  *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

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






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



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


Re: [Catalyst] JSONP support Catalyst::Controller::DBIC::API

2017-03-14 Thread Hartmaier Alexander

Looks like a code injection attack vector to me...

Patch + Tests for DBIC::API welcome!


On 2017-03-09 11:05, Rajesh Kumar Mallah wrote:




For the time being i have modified and solved my issue as below:

sub end : Private {
  my ( $self, $c ) = @_;

  ##
  # code for manipulating stash here
  ##

  $c->forward('serialize');

  my $cb = $c->request->params->{callback} ;

  if ($cb) {
  my $body = \$c->res->body;
  $$body = "$cb ($$body);";
  $c->res->body($$body);
  }

}


regds
mallah.



Hi ,

How to get JSON response body wrapped in a callback function
call (a.k.a JSONP) when using Catalyst::Controller::DBIC::API::REST

I use Catalyst::Controller::DBIC::API and 'end' function
in ControllerBase is like below:

sub end : Private {
 my ( $self, $c ) = @_;

 ##
  # code for manipulating stash here
 ##

 $c->forward('serialize');
}

=
In   Catalyst/Controller/DBIC/API.pm

# from Catalyst::Action::Serialize
sub serialize : ActionClass('Serialize') { }

=


My other JSON responses which are rendered via MyApp::View::JSON
can be modified as JSONP compatible as i have below in my App config

__PACKAGE__->config({
   'View::JSON' => {
   allow_callback  => 1,# defaults to 0
   },
});


===


The problem is only with automatically generated rest endpoints
from  Catalyst::Controller::DBIC::API.

Thanks in anticipation.


Regds
mallah.






















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




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

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


Re: [Catalyst] Change of server

2017-03-06 Thread Hartmaier Alexander

Don't use mod_perl!

Look at 
https://metacpan.org/pod/distribution/Catalyst-Manual/lib/Catalyst/Manual/Deployment/Apache/FastCGI.pod

Best regards, Alex

On 2017-03-03 06:02, "Andrés Chandía" wrote:
Hi there, I had a Catalyst application working on a debian 7 perl 5.14 apache 
2.4, but I had to change it to a new server working with ubuntu 16.04 perl 5.22 
apache 2.4.18.

I did all the installation in the same way I did it for the old debian but the 
apache server is not starting, and at the logs a get nothing but:

Mar 03 05:32:29 iac systemd[1]: apache2.service: Control process exited, 
code=exited status=1
Mar 03 05:32:29 iac systemd[1]: Failed to start LSB: Apache2 web server.
Mar 03 05:32:29 iac systemd[1]: apache2.service: Unit entered failed state.
Mar 03 05:32:29 iac systemd[1]: apache2.service: Failed with result 'exit-code'.

the apache config at the old server, wich I change accordingly, was:


PerlSwitches -I /mnt/vmdata/iac/web/lib
PerlModule IAC

ServerAdmin and...@chandia.net
ServerName iac.upf.edu
ServerAlias iac.upf.edu
DocumentRoot /mnt/vmdata/iac/web/root

use lib qw( /mnt/vmdata/iac/web/lib );



SetHandler modperl
PerlResponseHandler IAC


SetHandler none

Alias /iac/stats_tasks/ "/mnt/vmdata/iac/iac_data/stats-tasks"

SetHandler none
Order allow,deny
Allow from all

Alias /iac/txt_output/ "/mnt/vmdata/iac/iac_data/txt_output"

SetHandler none
Order allow,deny
Allow from all

CustomLog /var/log/apache2/iac.access.log combined
ErrorLog /var/log/apache2/iac.error.log


Any suggestion on what to look for or utimately how to solve this?

thanks a lot.


___
   andrés chandía
[chandia.net][http://mail.chandia.net/images/ico_tw.png]
NMT | 
Dungupeyem | Corlexim

administrador de:
Parles.upf | Amind terapia | Mapuche 
koyaktu | Nocando |
mail: ONG Mapuche koyaktu | 
Psicoaching |
P No imprima innecesariamente. ¡Cuide el medio ambiente!


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




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] usage / example for Catalyst::Controller::DBIC::API::REST

2017-03-06 Thread Hartmaier Alexander

Hi Mallah,

doc patches welcome! I know they are lacking.

Best regards, Alex


On 2017-03-01 07:43, Rajesh Kumar Mallah wrote:


Dear Dimitar/List  ,

indeed the example 1 below was correct.

The confusion resulted form multiple mistakes in my
observations and actions.

Sorry for the noise. Now my primary concern is sorted out.


Regds
mallah.





There are a couple of ways around that.

1. Search for that record id, for example:


  
http://10.100.102.38:3000/api/rest/general/members?limit=3_returns=holder1_returns=member_id_id=368

2. If it's a primary key or a unique key, you can easily fetch it:
http://10.100.102.38:3000/api/rest/general/members/368

Best regards,

On Tue, Feb 28, 2017 at 3:48 PM, Rajesh Kumar Mallah

wrote:



I am trying to use  Catalyst::Controller::DBIC::API::REST
to feed jtable with JSON

Eg :

the request

http://10.100.102.38:3000/api/rest/general/members?limit=3;
list_returns=holder1_returns=member_id

Leads to response:


{
   "Records": [
 {
   "member_id": 366,
   "holder1": "Jinesh"
 },
 {
   "member_id": 367,
   "holder1": "Gita"
 },
 {
   "member_id": 368,
   "holder1": "Sheela"
 }
   ],
   "Result": "OK"
}


The url contains the parameter 'limit' as i configured count_arg as
'limit'
I need a simple example on how to pass the search param

eg i want to recordset to be restricted to member_id=> 368


could anyone kindly help.
I have done my research before approaching this list.


regds
mallah.





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


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






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




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

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


Re: [Catalyst] post processing filter in Catalyst apps

2017-02-22 Thread Hartmaier Alexander

Hi,

if you want to do this for to use caching but still force the files to
get downloaded on a new app version I'd suggest appending a query
parameter, we use ?v=[% constants.version %] which is set in the view:


__PACKAGE__->config(
CONSTANTS  => { version => $Our::App::VERSION },

);

This shouldn't break using the templates without a Catalyst app in the
background and still does cache-busting.

Best regards, Alex

On 2017-02-19 09:40, Rajesh Kumar Mallah wrote:

Dear Catalyst Users ,


What would be a good place to post process the HTML output from
View (TT in my case).

I would want to replace all static urls with a url bearing version.
eg
/static/images/logo-1.png should become
/static/ver8922/images/logo-1.png


i cannot use uri_for in templates as our  frontend designers also
work on the same files and load them in a non-catalyst environment.
(using apache on windows).

Regds
mallah.







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




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

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


Re: [Catalyst] Applying a global SQL filter on REST controller.

2017-02-06 Thread Hartmaier Alexander

Hi Mallah,

typically with DBIx::Class you would have a Chained root action in your
controller which puts an already filtered DBIx::Class resultset on the
stash and have all other action chained off this one.

DBIC::API provides generate_rs [1] to enable you to do this.


On 2017-02-06 07:12, Rajesh Kumar Mallah wrote:


Ok it did work out and i am able achieve what i wanted.


I created the below subroutine in:

ControllerBase/REST.pm

sub list_munge_parameters {
 my ( $self, $c ) = @_;
 $c->log->debug(" * list_munge_parameters  callled!");
 $c->req->_set_search_parameters( { society_id =>
$c->user->society_id() } );
}

But is it ok to use "PROTECTED METHODS" ?

They might be renamed, go away etc. on a refactor, which is why they
aren't exposed and documented.



Regds
Mallah

Best regards, Alex

[1] https://metacpan.org/pod/Catalyst::Controller::DBIC::API#generate_rs







Ok i do see some light! that I am exploring.
Sorry for the noise i shall post again if i find a
solution or otherwise even.




  
http://search.cpan.org/~abraxxa/Catalyst-Controller-DBIC-API-2.006002/lib/Catalyst/Controller/DBIC/API.pm

list_munge_parameters

list_munge_parameters is a noop by default. All arguments will be passed
through without any manipulation. In order to successfully manipulate the
parameters before the search is performed, simply access
$c->req->search_parameters|search_attributes (ArrayRef and HashRef
respectively), which correspond directly to ->search($parameters,
$attributes). Parameter keys will be in already-aliased form. To store the
munged parameters call $c->req->_set_search_parameters($newparams) and
$c->req->_set_search_attributes($newattrs).




Dear Catalyst Experts/Users/Hackers,

Please guide for the below situation,
I have put reasonable effort by searching on online
resources.


We have an application backed by SQL tables that stores
data of multiple customers in same table . We have
many such tables and all of them bear a column customer_id
for separating the records of one customer to another.


The security isolation requirement is that one customer should
not get to see records of other customer. What i have in mind
is to append an SQL filter customer_id = << customer_id of logged in
customer >>
at a global level . The controller modules for each database table are
being (auto)generated by the helper
Catalyst::Helper::Controller::DBIC::API::REST The dataset is being
exposed
via REST utilising
Catalyst::Controller::DBIC::API

Can anyone please guide where such a constraint can be put ?

Regds
Rajesh Kumar Mallah.






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






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






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




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

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


Re: [Catalyst] soliciting feedback for alternative method attributes syntax

2016-01-11 Thread Hartmaier Alexander

Hi John,
the first question that came to my mind was: Why is it called At, both the 
module as well as the method attribute?

The 'Naming your Arguments' section is confusing because it populates a 
variable named '$id' but uses '$_{id}' for the response.
I understand that you want to show that the args get passed to the sub like in 
core Catalyst but I'd do that in a second example as the preferred way to do it 
with this module would be $_{id}.
I'd prefer to use the (experimental) subrouting signature feature of Perl 5.20 
than $_{id} which also doesn't have the same API as Perl 5.10 named regex 
capture patterns ($+{id}).

An example how to allow literal {  and } in a URL should be added (and the 
feature if that doesn't exist).

The example in 'Matching GET parameters' is incorrect, the full-uri should 
be'https://fqdn/example/query?name=john;age=47'.
Would it also match any order of the parameters like 
'https://fqdn/example/query?age=47;name=john'? I didn't find this in the 
Catalyst::ActionRole::QueryParameter docs.

That might be a stupid question because I don't know the internal workings but 
could it be called 'Chained' instead of 'Via' so if someone want's to convert 
the route matching to this module (s)he doesn't have to rewrite as much?

I think I like the parameter type matching and extraction more than the 
different syntax but I'm no good measure because I've grown up with Chained ;)

Cheers, Alex

On 2016-01-08 00:41, John Napiorkowski wrote:
Lots of people tell me the hardest thing about catalyst is the method 
attributes used to describe routes, particularly chaining.  Here's a sketch for 
an alternative syntax that encompasses chaining along with more simple routes.

jjn1056/Catalyst-ControllerRole-At




[image]











jjn1056/Catalyst-ControllerRole-At
Catalyst-ControllerRole-At - Alternative was to describe Catalyst URL matching 
paths.



View on github.com

Preview by Yahoo






the SYNOPSIS bit is still WIP so ignore it, but the rest of the docs are 
proposed final.  There's no code for this yet, just docs, I'm looking for 
feedback on 'is this easier to understand'.

Critique welcome, if constructive.  I know lots of people don't like the method 
attribute stuff, but I'm not doing any work on that right now, so constructive 
critique means not saying you'd prefer something other than method attributes 
:) I already hear that, but this is something that can layer as sugar on top of 
the existing work, or even mixed into an existing project.  I'm trying to split 
the difference between usefully different and alien brains difference.  Thanks

Jnap



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


-- LG Alex


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] HTML::FormHandler setting html attributes programatically in form class

2016-01-11 Thread Hartmaier Alexander

Hi,
I've solved this by encapsulating the logic in the form class, this way
it is testable completely decoupled from Catalyst.

Just access the passed object or define additional attributes in your
form class that are populated by the Catalyst app on instantiation.

With a before 'set_active' => sub {} Moose method modifier you can then
use add_active to activate deactivated fields (I've chosen that way round).

Cheers, Alex

On 2016-01-11 11:26, Hetényi Csaba wrote:

Dear Friends

Please, forgive me, i know, this is not a HTML::FormHandler related
list, but i hope, there are a lot of people here who use it!

In a catalyst app, i'd like to disable (make the field readonly and
disabled but not inactive) a form field based on a value (if user has
the role, or not).
If i set "hardwired" in the form class:


has_field 'foo' => ( type => 'Text', element_attr => { readonly =>
'readonly' }, disabled => 1 );


works perfectly.

But i'd like to apply the readonly/disabled attributes based on a
boolean value in form class.

I see, there is a "html_attributes callback" but don't know, how to
use it:

sub html_attributes {
my ( $self, $obj, $type, $attrs, $result ) = @_;
# obj is either form or field
$attrs->{class} = 'label' if $type eq 'label';
$attrs->{placeholder} = $self->_localize($attrs->{placeholder})
if exists $attrs->{placeholder};
return $attrs;
}


Thank You in advance!
Csabi


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




*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*

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


Re: [Catalyst] Keep Plack -r working when commandline closed...?

2015-10-29 Thread Hartmaier Alexander

I'm wondering why you not just use an init script or systemd service unit to 
start/stop/restart your app?

Best regards, Alex

On 2015-10-27 15:55, Len Jaffe wrote:
If all  you want is to start a process and leave, then huponexit and/or 
nohup+background are fine.
If you want to start a process (event in the foreground) and leave it running 
while you detatch, and come back later to the same session, then tmux is the 
way to go.

You can learn enough tmux to be dangerous in ten minutes.  The only features of 
ti that i use are window splitting, session detach, and session attach.

On Tue, Oct 27, 2015 at 5:25 AM, Kieren Diment 
> wrote:
I would say having HUPONEXIT false would be the more exotic feature set in this 
case.  tmux is actually a very good low rent low traffic short lifespan 
application deployment strategy ;).

On Tue, Oct 27, 2015 at 6:21 PM, Octavian Rasnita 
<orasn...@gmail.com> 
wrote:
Thanks. The conclusion is that if huponexit is set to false we can simply run 
processes in background appending & at the end of the command line.
So we don't need tmux nor screen unless we need other features offered by them.

--Octavian
- Original Message -
From: Lasse Makholm
To: The elegant MVC web framework
Sent: Monday, October 26, 2015 11:37 PM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?



On Mon, Oct 26, 2015 at 9:55 AM, Octavian Rasnita 
<orasn...@gmail.com> 
wrote:
When I connect to Linux servers using SSH and run the programs using
perl program.pl > something.log 2>&1 &
then I can use the command exit to close the SSH console but the program 
continues to run.
I remember that in past I needed to use nohup, but in last years I didn't need 
it anymore.

Is the SSH connection a special case but it doesn't work when using a real bash 
console directly?

Sounds like the huponexit is not set in your shell:
http://stackoverflow.com/questions/21294283/when-did-hup-stop-getting-sent-and-what-can-i-do-about-it

/L


--Octavian
- Original Message -
From: Len Jaffe
To:  kie...@diment.org ; The 
elegant MVC web framework
Sent: Monday, October 26, 2015 5:13 AM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?

& just backgrounds a job. If you close the terminal, you lose job control.
If you use tmux, you can close the terminal, but leave the session running, and 
reattach to the session later.

It is well work looking into.

On Sat, Oct 24, 2015 at 1:29 AM, Kieren Diment 
<dim...@gmail.com> wrote:
Tmux is the poor man's deployment pathway ;).  I use it to keep long running 
jobs going between logins a lot too, as well as for having an editor in the 
right place from where I last left off.  All round a primo useful tool.  Also 
handy for persistent IRC connections etc.

On Sat, Oct 24, 2015 at 3:24 PM, Andrew 
<catalystgr...@unitedgames.co.uk>
 wrote:
A further search online,
throws up that screen and tmux can be useful if the app you want to run in the 
background needs input now and again.

- Original Message -
From: Andrew
To: The elegant MVC web framework
Sent: Saturday, October 24, 2015 5:06 AM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?


Why is it better to use these over using an "&"?

Or are you simply recommending them generally, due to their usefulness all 
round?

Yours,
Andrew.

- Original Message -
From: Kieren Diment
To: The elegant MVC web framework
Sent: Friday, October 23, 2015 10:48 PM
Subject: Re: [Catalyst] Keep Plack -r working when commandline closed...?

Tmux is generally newer and easier to use than screen, highly recommended.

On Sat, Oct 24, 2015 at 7:41 AM, Len Jaffe 
<lenja...@jaffesystems.com>
 wrote:
I'd still consider using screen or tmux...

On Fri, Oct 23, 2015 at 1:48 PM, Andrew 
<catalystgr...@unitedgames.co.uk>
 wrote:
Turns out it's super easy to run it in the background, =).

You just add "&" to the end of the commandline, =D.

^_^ Am learning these little server tricks, ;-).

[Tweeted Tatsuhiko Miyagawa of Plack fame, who was kind enough to promptly
respond, with this little gem, =D. Yay!]

Yours,
Andrew.


- Original Message -
From: "Trevor Leffler" 

Re: [Catalyst] A Catalyst::Plugin::Session Alternative: Web::Starch

2015-07-09 Thread Hartmaier Alexander

Hi Aran,
did you look at Plack::Session if you want something decoupled from Catalyst?
I haven't used it so far as I don't require sessions that are shared with 
non-Catalyst stuff but it might be a better base for a futureproof session 
module.

On 2015-07-09 02:17, Aran Deltac wrote:
Hey guys,

I've been working on a project which is a (mostly) drop in replacement for 
Catalyst::Plugin::Session.  Here are the GitHub repos:

https://github.com/bluefeet/Web-Starch
https://github.com/bluefeet/Web-Starch-Store-CHI
https://github.com/bluefeet/Web-Starch-Store-AmazonDynamoDB
https://github.com/bluefeet/Web-Starch-Plugin-Sereal
https://github.com/bluefeet/Catalyst-Plugin-Starch

The manual is a good place to start:

https://github.com/bluefeet/Web-Starch/blob/master/lib/Web/Starch/Manual.pod

I'm using this @work and will be deploying it to production, replacing 
Catalyst::Plugin::Session, sometime next week if all goes well this week.

I've not put these modules on CPAN yet as I'd love some feedback before I do 
so.  I want to make sure the module names, the interfaces, and just the entire 
design are acceptable to people.  I want this to be a real step forward.

@work we've made extensive use of Catalyst::Plugin::Sesssion for years now, and related 
modules such as Catalyst::Plugin::Authentication.  So far everything has just 
worked when I replaced Catalyst::Plugin::Session with Catalyst::Plugin::Starch.

Why do this?

 *   Catalyst::Plugin::Session (C:P:S) is slower in NYTProf reports than I 
would expect it to be.
 *   C:P:S is tied into Catalyst.  This is unnecessary.  Catalyst should be 
used to glue things together, not as a platform to build whole technologies on. 
 By decoupling sessions from Catalyst many wins can be had in reusability and 
unit testing (etc?).
 *   C:P:S can be difficult and messy to extend.  This is partly due to how 
Catalyst plugins work, but also due to the design of C:P:S.

Aran



___
List: Catalyst@lists.scsys.co.ukmailto:Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/




***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Where best to store database connection information?

2015-02-17 Thread Hartmaier Alexander

Note that Catalyst itself doesn't use any config loading,
Catalyst::Plugin::ConfigLoader does.
This then uses different config file format modules depending on the
file extension.


On 2015-02-16 18:10, Octavian Rasnita wrote:

Catalyst uses Config::General to read .conf files. If Config::General
is configured with the option -UseApacheInclude,
then you can use an apache include file.conf in the .conf file to
include another file from another directory which is not saved by git.

Or the option -IncludeDirectories can be also useful so all the files
from the given directory will be included.

--Octavian

- Original Message - From: David Schmidt davew...@gmx.at
To: The elegant MVC web framework catalyst@lists.scsys.co.uk
Sent: Monday, February 16, 2015 6:22 PM
Subject: Re: [Catalyst] Where best to store database connection
information?



the catalyst configloader can load more then just one file.

by default it loads myapp.conf

if a file named myapp_local.conf exists it is loaded aswell.

docs:
https://metacpan.org/pod/distribution/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader/Manual.pod#Using-a-local-configuration-file

On 16 February 2015 at 15:42, Adam Witney awit...@sgul.ac.uk wrote:

Hi,

I have a Catalyst / DBIx::Class application and I have been storing
the database connection parameters in a config file which is sourced
using MYAPP_CONFIG_LOCAL_SUFFIX. But this seems a bit of a security
problem having the main password in a text file like this,
especially if it goes into git.

Is there a recommended or best practice place to store database
connection information?

Thanks for any help

Adam

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


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



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




***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***

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


Re: [Catalyst] Overloading delete and update CRUD methods - but where?

2014-08-12 Thread Hartmaier Alexander
Hi Andy,
I suggest to do the override in the model or business model layer, not 
dbic::api itself.
This ensures that no other code deletes a row.

Cheers, Alex

On 2014-08-08 10:16, Andy Holyer wrote:
I'm working on a Catalyst application which mainly uses 
Catalyst::Controller::DBIC:API::REST to provide CRUD (Create, Read, Update, 
Delete) access to a MySQL database.

A feature the customer requires is that database records are non-destructive, 
in order to provide an additional level of security (the application is 
financial, so it's important that users cannot remove records from the actual 
database). The number of records which will be in the final system is 
relatively low, in the thousands, so the presence of defunct records will not 
slow down database operations).

To implement this I have added a flag, defunct to all database tables, and I 
now need to overload the delete and update methods as follows:

delete - set defunct to true

update - delete (see above) existing record, write updated record to the 
database.

What I can't work out at the moment is where in the inheritance hierarchy of 
classes are the methods I should overload. It doesn't look as though 
Catalyst::DBIC::API is the correct place, since there seem to be a number of 
similar but related methods to perform deletion and updating. The individual 
record methods as far as I can see are implemented at the bottom level of 
Moose, but I'm not sufficiently comfortable with Moose internals to work out 
exactly what to overload. I'm continuing with research on the matter, but thsi 
must be a behaviour which has been done before, and any advice or pointers to 
online documentation or tutorials would be very handy.

Thanks in advance for any help, I will summarize results to the list if need be.

Andy Holyer, Brighton, UK.





___
List: Catalyst@lists.scsys.co.ukmailto:Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/




***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] DBIx::Class::Core does not define $DBIx::Class::Core::VERSION--version check failed at /usr/local/lib/perl5/site_perl/5.16/Module/Runtime.pm line 386.

2014-02-17 Thread Hartmaier Alexander
Update Moose, I had the same problem when I updated some other modules
but not Moose.

On 2014-02-17 18:20, Alex Povolotsky wrote:
 Hello

 I've started an application with Catalyst, added some fairly simple
 and tested code, and got an error

 Couldn't instantiate component Monitor::Model::DB, {UNKNOWN}:
 DBIx::Class::Core does not define $DBIx::Class::Core::VERSION--version
 check failed at /usr/local/lib/perl5/site_perl/5.16/Module/Runtime.pm
 line 386.
 Compilation failed in require at
 /usr/local/lib/perl5/site_perl/5.16/Class/C3/Componentised.pm line
 150. at /usr/local/lib/perl5/site_perl/5.16/Class/C3/Componentised.pm
 line 155
 Compilation failed in require at
 /usr/local/lib/perl5/site_perl/5.16/Catalyst/Restarter/Forking.pm line
 20.


 here is a list of my Catalyst-related modules

 p5-Catalyst-Action-REST-1.14   Automated REST Method Dispatching for
 Catalyst
 p5-Catalyst-Action-RenderView-0.16 Sensible default end action for
 Catalyst
 p5-Catalyst-ActionRole-ACL-0.07 User role-based authorization action
 class
 p5-Catalyst-Authentication-Store-DBIx-Class-0.1505 A storage class for
 Catalyst Authentication using DBIx::Class
 p5-Catalyst-Component-InstancePerContext-0.001001 Return a new
 instance a component on each request
 p5-Catalyst-Controller-ActionRole-0.15 Apply roles to action instances
 p5-Catalyst-Controller-FormBuilder-0.06 Catalyst FormBuilder Base
 Controller
 p5-Catalyst-Devel-1.38 Catalyst Development Tools
 p5-Catalyst-DispatchType-Regex-5.90.032 Regex DispatchType
 p5-Catalyst-Model-DBIC-Schema-0.62_1 DBIx::Class::Schema Model Class
 p5-Catalyst-Plugin-Authentication-0.10023_1,3 Infrastructure plugin
 for the Catalyst authentication framework
 p5-Catalyst-Plugin-ConfigLoader-0.32 Load config files of various types
 p5-Catalyst-Plugin-FormBuilder-1.07_1 FormBuilder for Catalyst
 p5-Catalyst-Plugin-Session-0.39 Generic Catalyst Session plugin
 p5-Catalyst-Plugin-Session-State-Cookie-0.17 Stores a Catalyst Session
 in a Cookie
 p5-Catalyst-Plugin-Session-Store-FastMmap-0.16 FastMmap session
 storage backend
 p5-Catalyst-Plugin-Session-Store-File-0.18 File storage backend for
 session data
 p5-Catalyst-Plugin-Static-Simple-0.31 Make serving static pages painless
 p5-Catalyst-Plugin-Unicode-0.93 Unicode aware Catalyst
 p5-Catalyst-Runtime-5.90053The Elegant MVC Web Application
 Framework (Runtime)
 p5-Catalyst-View-TT-0.41   Template Toolkit view class for Catalyst
 p5-CatalystX-Component-Traits-0.16 Automatic Trait Loading and
 Resolution for Catalyst Components
 p5-CatalystX-InjectComponent-0.025 Inject components into your
 Catalyst application
 p5-CatalystX-SimpleLogin-0.18  Provide a simple Login controller which
 can be reused
 p5-Test-WWW-Mechanize-Catalyst-0.58 Test::WWW::Mechanize for Catalyst

 DBIx::Class::Core indeed does not define $VERSION, it is defined in
 DBIx::Class, autogenerated Schema::Result modules uses
 DBIx::Class::Core, but did not attempt to check VERSION

 Is any of my modules totally outdated?

 Alex

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



***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***

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


Re: [Catalyst] Changing format of date field

2014-01-08 Thread Hartmaier Alexander
On 2014-01-08 18:19, Adam Witney wrote:


 On 7. 1. 2014 9:55, neil.lunn wrote:

 3. You *Are* going to get back a string in the raw params. So what you
 need to do is parse that format into a DateTime object again when
 submitting back to model or wherever else you want to use it as an
 object.

 Thanks guys for the various suggestions, I think I will follow this
 approach above and leave the format to the view as suggested!

 Thanks again

 Adam
I have various format_ methods in my view class that are exposed to TT
using View::TT's expose_methods config option including format_date,
format_datetime and format_datetime_ajax.


***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***

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


Re: [Catalyst] Changing format of date field

2014-01-08 Thread Hartmaier Alexander

On 2014-01-08 18:56, Adam Witney wrote:


 On 8. 1. 2014 17:31, Hartmaier Alexander wrote:
 On 2014-01-08 18:19, Adam Witney wrote:


 On 7. 1. 2014 9:55, neil.lunn wrote:

 3. You *Are* going to get back a string in the raw params. So what you
 need to do is parse that format into a DateTime object again when
 submitting back to model or wherever else you want to use it as an
 object.

 Thanks guys for the various suggestions, I think I will follow this
 approach above and leave the format to the view as suggested!

 Thanks again

 Adam
 I have various format_ methods in my view class that are exposed to TT
 using View::TT's expose_methods config option including format_date,
 format_datetime and format_datetime_ajax.

 Thanks Alexander, could you possibly send me an example of the
 format_datetime? I am trying to figure exactly where and how to put it
 in.

 Thanks

 Adam

package NAC::Web::NAC::View::HTML;

use strict;
use warnings;
use Safe::Isa;
use parent 'Catalyst::View::TT';

__PACKAGE__-config(
TEMPLATE_EXTENSION = '.tt',
render_die = 1,
CONSTANTS  = { version = $NAC::Web::NAC::VERSION, },
ENCODING   = 'utf-8',
expose_methods = [
qw( format_bps format_bytes format_datetime format_date
format_datetime_ajax format_int_speed format_int_speed_real )
],
);

=head1 NAME

NAC::Web::NAC::View::HTML - TT View for NAC::Web::NAC

=head1 DESCRIPTION

TT View for NAC::Web::NAC.

=over

=item format_datetime

Returns a scalar from a DateTime object stringified to %Y-%m-%d %H:%M %z.

=cut

sub format_datetime {
my ( $self, $c, $datetime ) = @_;

if ( $datetime-$_isa('DateTime') ) {

   # FIXME: yes that's ugly, but else we'd need to get the users
timezone or format client-side
return $datetime-clone-set_time_zone('Europe/Vienna')
-strftime('%Y-%m-%d %H:%M %z');
}

return;
}

1;


***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***

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


Re: [Catalyst] Can't detach from root / create action object

2013-11-28 Thread Hartmaier Alexander
On 2013-11-28 10:43, Craig Chant wrote:

Hi Charlie,

So it is a URI for a method name in the controller class object you wish to 
execute.

So rather than matching it as a Path URL, it matches it a as a 
'ControllerClass/Method'

So for the URL path in my case would be '/complianceupdates/' , but for detach 
it is '/complianceupdates/index'

As index is the name of the method that handles the '/' path.

Got it! Many thanks,

The advantage or all this is that you change change your url layout without 
touching the code at all.



Craig.

-Original Message-
From: Charlie Garrison [mailto:garri...@zeta.org.au]
Sent: 27 November 2013 22:47
To: The elegant MVC web framework
Subject: RE: [Catalyst] Can't detach from root / create action object

Good morning,

On 27/11/13 at 2:51 PM -, Craig Chant 
cr...@homeloanpartnership.commailto:cr...@homeloanpartnership.com wrote:



Or are there two single argument signatures to detach() one takes an
Action object and one takes a URL path string?



Being pedantic here, but it doesn't accept a URL path; it accepts an action 
path. Often they are the same, but they don't need to be.

# in Root Controller
sub my_list :Path('list') { ... }

You would pass /my_list to detach, but the URL for that action would be /list.


Charlie

--
? Charlie Garrison ? garri...@zeta.org.aumailto:garri...@zeta.org.au

O ascii ribbon campaign - stop html mail - 
www.asciiribbon.orghttp://www.asciiribbon.org
?  http://www.ietf.org/rfc/rfc1855.txt


___
List: Catalyst@lists.scsys.co.ukmailto:Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnership reserves the right to monitor and archive all e-mail communications 
through its network. No representative or employee of HomeLoan Partnership has
the authority to enter into any contract on behalf of HomeLoan Partnership by 
email. HomeLoan Partnership is a trading name of H L Partnership Limited, 
registered in England and Wales with Registration Number 5011722. Registered 
office: Pharos House, 67 High Street, Worthing, West Sussex, BN11 1DN. H L 
Partnership Limited is authorised and regulated by the Financial Conduct 
Authority.




___
List: Catalyst@lists.scsys.co.ukmailto:Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/




***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Can't detach from root / create action object

2013-11-27 Thread Hartmaier Alexander



On 2013-11-27 13:00, Craig Chant wrote:


I seem to be going round in circles unable to understand how I create an action object so I can pass it to detach as the IRC has told me to pass in an action and not what I thought which was controller_name, subroutine.







E.G. 

$c-detach(my_controller_name,index);

But it seems that this signature is (class_name, subroutine)

Im having a problem with Catalyst randomly deciding when it is OK to have a controller and a model called the same, as I have in the same root auto subroutine ,


$c-detach(splashscreen,index). 

Where I have both a controller called SplashScreen and a model called SplashScreen, and the detach works fine.


However, for another controller / model pair called ComplianceUpdates,


This doesnt work

$c-detach(complianceupdates,index). 

and errors with
Couldn't forward to ComplianceUpdates. Does not implement process
Couldn't detach to command complianceupdates: Invalid action or component.
So If I am to use 

$c-detach($action); 

How do I create a Catalyst::Action object.


Exactly like I just told you on IRC: $c-detach($c-controller('ComplianceUpdate')-action_for('index'));



What attributes am I meant to be setting in the object before I pass it in, and where are the docs for this as I cant find them.

All help is appreciated.


Craig Chant
Information Technology Manager



 Direct Line: 01903 227 753 Main Line: 01903 602 664 Website:
www.homeloanpartnership.com




This Email and any attachments contain confidential information and is intended solely for the individual to whom it is addressed. If this Email has been misdirected, please notify the author as soon as possible. If you are not the intended recipient you must
 not disclose, distribute, copy, print or rely on any of the information contained, and all copies must be deleted immediately. Whilst we take reasonable steps to try to identify any software viruses, any attachments to this e-mail may nevertheless contain
 viruses, which our anti-virus software has failed to identify. You should therefore carry out your own anti-virus checks before opening any documents. HomeLoan Partnership will not accept any liability for damage caused by computer viruses emanating from any
 attachment or other document supplied with this e-mail. HomeLoan Partnership reserves the right to monitor and archive all e-mail communications through its network. No representative or employee of HomeLoan Partnership has the authority to enter into any
 contract on behalf of HomeLoan Partnership by email. HomeLoan Partnership is a trading name of H L Partnership Limited, registered in England and Wales with Registration Number 5011722. Registered office: Pharos House, 67 High Street, Worthing, West Sussex,
 BN11 1DN. H L Partnership Limited is authorised and regulated by the Financial Conduct Authority.

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





***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***



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


AW: [Catalyst] [Announce] Catalyst-Runtime-5.7015

2008-10-16 Thread Hartmaier Alexander
On startup of the test server I get the following message with 5.8000_02.

Can't locate object method follow_symlinks via package 
Catalyst::Engine::HTTP::Restarter::Watcher at 
/usr/local/share/perl/5.8.8/Catalyst/Engine/HTTP/Restarter/Watcher.pm line 119.

-Alex

-Ursprüngliche Nachricht-
Von: Marcus Ramberg [mailto:[EMAIL PROTECTED]
Gesendet: Wednesday, October 15, 2008 11:43 PM
An: The elegant MVC web framework
Betreff: [Catalyst] [Announce] Catalyst-Runtime-5.7015

Hi.

Just a quick notice to tell you that we have released a minor
maintenance release of the main Catalyst distribution to fix a test
failure that occurs due to a change in the latest LWP release. Here is
the change log:

5.7015  2008-10-15 22:57:00
  - Workaround change in LWP that broke a cookie test (RT
#40037)

Besides that, we are working hard to bring you the next major release
of Catalyst, version 5.8. The release is currently feature complete,
and we are now working to make it leaner and faster before release. A
development snapshot, 5.8000_02 was recently uploaded to CPAN, and can
be found at http://search.cpan.org/~mramberg/Catalyst-
Runtime-5.8000_02/ . Please feel free to test it with your apps and
report back any issues to the development team.

Be well
Marcus Ramberg
Release Manager

--
Nordaaker Ltd

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


***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***


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


Re: [Catalyst] [Announce] Catalyst-Runtime-5.7015

2008-10-16 Thread Hartmaier Alexander
He mentioned 5.8000_02 was well

-Alex

-Ursprüngliche Nachricht-
Von: J. Shirley [mailto:[EMAIL PROTECTED]
Gesendet: Thursday, October 16, 2008 5:14 PM
An: The elegant MVC web framework
Betreff: Re: [Catalyst] [Announce] Catalyst-Runtime-5.7015

On Thu, Oct 16, 2008 at 7:58 AM, Hartmaier Alexander
[EMAIL PROTECTED] wrote:
 On startup of the test server I get the following message with 5.8000_02.

 Can't locate object method follow_symlinks via package 
 Catalyst::Engine::HTTP::Restarter::Watcher at 
 /usr/local/share/perl/5.8.8/Catalyst/Engine/HTTP/Restarter/Watcher.pm line 
 119.

 -Alex


Wrong thread, this is about 5.7015 :)

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


***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***


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


AW: [Catalyst] Sending E-Mails

2008-10-02 Thread Hartmaier Alexander
Would be great if you had told us how you're sending the mails.
Catalyst::View::Email?

Regards, Alex

-Ursprüngliche Nachricht-
Von: goetz [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 02. Oktober 2008 12:32
An: The elegant MVC web framework
Betreff: [Catalyst] Sending E-Mails

Hallo catalyst friends,


I created a simple form for contact informations ( using email,
FormFu ).
When I use Catalysts built-in HTTP server receiving e-mails from this
form works fine.

As soon as I run the app using  FastCGI and Apache no emails will be
send.

At the moment I really don't know if it is a catalyst, a postfix or an
apache
problem.
So it would be helpfull if somebody could push me in the right
direction.

Any help is welcome

Götz



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


***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***


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


AW: AW: [Catalyst] Sending E-Mails

2008-10-02 Thread Hartmaier Alexander
Plugin::Email is deprecated, use View::Email instead.

Regards, Alex

-Ursprüngliche Nachricht-
Von: goetz [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 02. Oktober 2008 14:26
An: The elegant MVC web framework
Betreff: Re: AW: [Catalyst] Sending E-Mails

Thanks for the hint.

But nothing changed.


Am 02.10.2008 um 13:51 schrieb Moritz Onken:


 Am 02.10.2008 um 13:45 schrieb goetz:



 I use the email plugin:

 use Catalyst qw/
   -Debug
   ConfigLoader
   Static::Simple
   StackTrace
   Prototype
   Email
   /;


 Hi,

 try to configure Plugin::Email to use a smtp server:

   __PACKAGE__-config-{email} = [
   'SMTP',
   'smtp.myhost.com',
   username = $USERNAME,
   password = $PASSWORD,
   ];

 replace smtp.myhost.com with localhost, username and password
 can be blank if your smtp server doesnt require auth for local
 users.

 Furthermore you might want to set the attribute of send_email to
 Private and call the method with $self-send_email($c, $params);
 Otherwise this method can be called by a request to this
 controller via a browser.

 Viele Grüße

 Moritz
 ___
 List: Catalyst@lists.scsys.co.uk
 Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
 Dev site: http://dev.catalyst.perl.org/



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

***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***


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


RE: [Catalyst] Announce: Instant AJAX web front-end for DBIx::Class

2008-08-20 Thread Hartmaier Alexander
Hi Oliver!

You're module is GREAT!
I've done something similar years ago in Embperl which takes a table name and 
discovers its columns and datatypes and uses a helper table for storing the 
relationships.
Last week I finally started porting it to Catalyst and though about doing 
something your module does, so it’s a massive time saver for me, thanks!

I've installed 0.25 some hours ago and got it working after using dumper to add 
the datatype informations to my dbic model classes (I started writing them at a 
time when there was no DBIx::Class::Schema::Loader, dbic was at 0.01) and was 
in no need for this metadata till now.

I've only stumbled across two problems at the moment:

1) the use of c.extjs2 in the template which needed changing to c.config.extjs2
2) [error] Caught exception in MyApp::Model::LFB::Metadata-process Use of 
uninitialized value in exists at 
/usr/local/share/perl/5.8.8/CatalystX/ListFramework/Builder/Model/Metadata.pm 
line 137.
which I fixed by changing the line to:
$ti-{cols}-{$col}-{extjs_xtype} = $xtype_for{ $info-{data_type} }
if (defined $info  exists $info-{data_type}  exists 
$xtype_for{ $info-{data_type} });

Feel free to mail me off-list for help or other things about your module!

-Alex

-Original Message-
From: Oliver Gorwits [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2008 1:15 AM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Announce: Instant AJAX web front-end for DBIx::Class

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Moritz,

Moritz Onken wrote:
| Great goob! A few comments:
|
| * Is it possible to add this as a plugin to an existing catalyst
|  application (as an admin panel)?

I've just released a new version of LFB (0.25) to the CPAN, which
has much better support for relocation.

When it arrives on CPAN, read the documentation to see how to set a
path under which the LFB application will run. You can then use it
as a regular Catalyst Plugin to an application.

For now, you'll still have to set the DBIx::Class Model
configuration separately for LFB, which will mean some duplication
in your configuration. I'll look into fixing that later.

| * Why do you not use the filter
| abilities of extjs for the grid? they are much more convenient

The ExtJS filter works locally on data already retrieved by the
browser. What I am doing is sending search parameters to the web
server via AJAX, which is something different. Sorry if I've
misunderstood you.

| * Did you think about prodiving a
| different interface for selecting the items depending on the
| number of possible values?

I think there are a few different ideas, here, but essentially the
application doesn't know how many possible values there are when it
generates the user interface...

| What I'm saying: If you specify the
| color of a item (red, blue, and green) and would be great to have
| a radiogroup to select it.

LFB does not yet have support for enumerated types as you find in
some databases such as PostgreSQL - it's something I am considering
adding support for, though. That would address your red/green/blue
use case, I suppose.

| If there are many (10) It would be
| great to have a select box. If there are even more (1000) an
| autocomplete field would be great.

The combobox used for has_many relations will autosuggest if you
type in (I think) four characters, then wait a bit. In v0.25 I've
fixed this to be a case insensitive search. It's horribly
inefficient though, as it's filtering against all records in the
related table (specifically, their display_name or stringification).
But then LFB isn't designed for speed, but usefulness.


Many thanks indeed for the feedback :-)

regards,
oliver.
- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIq1PW2NPq7pwWBt4RAiyyAKC8qnPfY04ZIemihFe9hgqxi+rlBACgpef2
DKwDa4ly6aVKJHCdLbB5AAM=
=r+sm
-END PGP SIGNATURE-

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

***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***


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


AW: [Catalyst] Announce: Catalyst::View::RRDGraph

2008-08-07 Thread Hartmaier Alexander
Hi Jose!

Our network monitoring tool used rrd about seven years ago when I took over the 
development of it.
Soon later I've started generation the graphs myself using GD::Graph.
About two years ago I moved the graph generation code in a module.
For my catalyst apps I parse the graph urls with a regex controller method into 
its parameters (type of graph, id, timespan, etc.), generate the graph using my 
module and store it in a fastmmap cache for reuse and serve it then.
Works absolutely fantastic.

Thanks mst for the idea!

Regards, Alex


Von: Jose Luis Martinez [EMAIL PROTECTED]
Gesendet: Sonntag, 03. August 2008 19:21
An: The elegant MVC web framework
Betreff: [Catalyst] Announce: Catalyst::View::RRDGraph

Hi!

I've uploaded Catalyst::View::RRDGraph to CPAN, for people interested
in adding RRD graphs to their Cat apps. I've written a bit on it at
http://www.pplusdomain.net/cgi-bin/blosxom.cgi

Has anyone been graphing RRDs in their Cat apps? I'd like to hear how
they've been doing it until now.

Regards,

Jose Luis Martinez
[EMAIL PROTECTED]

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


***
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Sending email from a Catalyst app

2008-07-21 Thread Hartmaier Alexander

***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then 
delete this e-mail immediately.
***---BeginMessage---
winmail.dat---End Message---
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] [Announce] Catalyst-Runtime 5.7099_01 - Developer Release

2008-06-27 Thread Hartmaier Alexander

***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then 
delete this e-mail immediately.
***---BeginMessage---
winmail.dat---End Message---
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Catalyst::Authentication::Credential::LDAP

2008-06-25 Thread Hartmaier Alexander
Hi!

Imho thats very useful!
Some generic plugin or extending C::P::Auth to combine two auth stores, one for 
authentication and one as source for the roles etc. would be great!

-Alex


-Original Message-
From: Johannes Plunien [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2008 6:46 AM
To: catalyst@lists.scsys.co.uk
Subject: [Catalyst] Catalyst::Authentication::Credential::LDAP

Hi,

there's already C::A::Store::LDAP to authenticate users against LDAP
servers. This module fetches a user from LDAP and checks his password
(if you told C::A::Credential::Password password_type = self_check).
In most of my apps i don't want to fetch the user from LDAP whereas i
just want to check his password against LDAP. The user, his roles and
preferences are stored in a database. So i use
C::A::Store::DBIx::Class to retrieve a user from the store and a
custom C::A::Credential::LDAP to verify his password.
Maybe this setup is used by someone else too and above all
C::A::Credential::LDAP is useful?
If that's the case i'll put it on CPAN - what do you think?

Thanks for your time,
plu

--
Johannes Plunien | mailto:[EMAIL PROTECTED] | http://www.pqpq.de


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


***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
***


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


RE: [Catalyst] Invalid session ids being generated

2008-05-09 Thread Hartmaier Alexander
Delete the session cache file!
I had a similar problem.

-Alex


-Original Message-
From: Ryan Pack [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 1:03 AM
To: The elegant MVC web framework
Subject: RE: [Catalyst] Invalid session ids being generated

I was able to fix it by downgrading Catalyst::Plugin::Session.  We were
on 0.13 until I upgraded to .19 (latest) along with a bunch of other
Catalyst modules.  Just as a last resort before I downgraded everything
back to the way it was I tried just downgrading
Catalyst::Plugin::Session and it worked!  Woohoo!

Ryan Pack

Programmer

Genares Worldwide Reservations

P. 817-722-2834

F. 817-442-0600


-Original Message-
From: Daniel Westermann-Clark [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 08, 2008 2:00 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Invalid session ids being generated

On 2008-05-07 17:38:12 -0500, Ryan Pack wrote:
 My Catalyst app is using Session::State::Cookie,
 Session::State::URI, and Session::Store::DBIC.  We recently started
 using the param option in Session::State::URI.  We were tacking the
 session id onto the base URL but now it is being included as a
 parameter.  Anyways, when you first make a request, a cookie is set
 with a valid session_id but uri_for returns the url with a totally
 different session id which doesn't even exist in the database.

Please send the output of a full request cycle using the debug flag.
For example, with the built-in server:

DBIC_TRACE=1 ./script/*server.pl -r -d

I'm not sure that using two Session::State plugins is recommended.  At
the very least, have you set the no_rewrite_if_cookie flag for
Session::State::URI?

-- 
Daniel Westermann-Clark

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

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

***
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
***
Notice: This e-mail contains information that is confidential and may be 
privileged.
If you are not the intended recipient, please notify the sender and then delete 
this e-mail immediately.
***
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] DBIC ResultSet - what columns in it?

2007-12-19 Thread Hartmaier Alexander
sleeping longer + coffee does the trick for me ;-)
Also don’t ask after working for more than ten hours, that makes me blind as 
well (mst can tell you a thing or two about it...)

-Alex


-Original Message-
From: Silvio Almeida [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 5:48 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] DBIC ResultSet - what columns in it?

Thanks Andreas, that's what I need.

It's in pod indeed, I need to sleep better.

Silvio


Andreas Marienborg wrote:
 Wrong list, but $rs-result_source-columns might give you that?

 http://cpansearch.perl.org/~ash/DBIx-Class-0.08008/lib/DBIx/Class/ResultSource.pm#columns
  



 - andreas

 On 19. des.. 2007, at 06.09, Silvio Almeida wrote:

 I was looking for a way to get column names from a ResultSet.

 If I have a table with columns id, to, from, subject which is mapped 
 into Email then if I do

 $c-model('Email')-{_source_handle}{schema}{source_registrations}{Reuniao}{_ordered_columns}
  


 then I get [ qw/ id to from subject / ] indeed, but it would be nice 
 to have a simpler method to get there.


 Silvio
 ___
 List: Catalyst@lists.scsys.co.uk
 Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: 
 http://www.mail-archive.com/[EMAIL PROTECTED]/
 Dev site: http://dev.catalyst.perl.org/


 ___
 List: Catalyst@lists.scsys.co.uk
 Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: 
 http://www.mail-archive.com/[EMAIL PROTECTED]/
 Dev site: http://dev.catalyst.perl.org/



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/



smime.p7s
Description: S/MIME cryptographic signature
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] sending email with attachment

2007-12-17 Thread Hartmaier Alexander
It's a view, not a plugin!

View::Email can send attachments, for View::Email::Template you need to create 
the MIME part with MIME::Creator yourself atm.

Patches are welcome ;-)

-Alex

-Original Message-
From: Ash Berlin [mailto:[EMAIL PROTECTED]
Sent: Monday, December 17, 2007 4:48 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] sending email with attachment


On 17 Dec 2007, at 15:25, Michael Higgins wrote:

 How are others out there doing this? My application serves a .pdf file
 directly, but I'd like to send as an email attachment to the account
 as
 well.

 Looking at
 Catalyst/View/Email/Template.pm
 in the 'TO DO' section, There needs to be a method to support
 attachments...

 So, are there any recommendations for how to proceed? Generally I'd
 use
 MIME::Lite for this outside of Catalyst, but I'd like to stay in the
 Plugin:: space, and word is MIME::Lite isn't the best way currently.

 Cheers,

I just use MIME::Lite in my cat app.

And I've never understood the desire to use plugins for everything
under the sun... but thats just me.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/



smime.p7s
Description: S/MIME cryptographic signature
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/