You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Hartmaier Alexander <Al...@t-systems.at> on 2005/06/15 14:44:52 UTC
cdbi & embperl
Hi lists!
I use Embperl (2.0) since over 3 years now and Class::DBI since I discovered
it approx. at the beginning of this year.
I want to implement functions or methods to display html tables for some of
my cdbi objects with different filters (e.g. show all, show only a subset
based on an sql where clause AND sort them by different columns).
At the moment (without the use of cdbi) I have an 'embperl library' which I
load with
[!
Execute ({ inputfile => 'library.epl', import => 1 });'
!]
in every of my pages.
In this library I have defined several subs which get the database handle,
the sql query or sometimes only the where clause and the sort field(s)
passed and print the table with Embperl.
I thought that it *might* be better to move them into a method of the
different classes...
Is there a preferred way to do this or how to some of you do it?
With kind regards
Alexander Hartmaier
T-Systems Austria GesmbH
Rennweg 97-99 1030 Wien
phone: +43 57057-4320
fax: +43 57057-95-4320
mobile: +43 676 8642 4320
mail: alexander.hartmaier@t-systems.at
internet: http://www.t-systems.at <http://www.t-systems.at/>
RE: cdbi & embperl
Posted by Gerald Richter <ri...@ecos.de>.
>
> Is there a preferred way to do this or how to some of you do it?
>
>
You should move it to the Embperl application object. Then you can put it in
$epreq -> {foo} and access it from every of your pages
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org