I've been doing a lot of repetitive operations on the results from
manager functions lately.
Today I think I realized a functionality that might make sense -- if
the results returned by a manager call weren't simply an array, but a
class object.
It would behave just as an array - there wou
On Feb 8, 2007, at 5:22 PM, Michael Reece wrote:
> and get the right datetime value, but is there an easy way to
> influence the timezone on all DateTime objects created by
> Rose::DB::Object?
I had the same problem yesterday (sorta).While on the subject I'd
(generally) highly recommend u
if i do something like
$obj->my_date('now');
$obj->save;
i get UTC times. i see that i can define the column as
saved_on => { type => 'datetime', time_zone => 'America/New_York' }
and get the right datetime value, but is there an easy way to
influence the timezone on all DateTime ob
On 2/8/07 6:10 PM, Jonathan Vanasco wrote:
> actually, how do you feel about this replacement routine?
That looks pretty much like what I checked in after my previous reply :)
(still hunting for all the $self->{'dbh'} instances...)
-John
thanks, jonathan.
that is (roughly) the approach i tried after sending my last mail,
package Vinq::RDBO::_mysql;
use base 'Rose::DB::Object';
use strict;
use warnings;
use Vinq::Globals qw($dbh);
use Vinq::RDB::MySQL;
our $MAKING_CLASSES = 0;
sub init_db {
my $_db
On Feb 8, 2007, at 7:24 PM, Michael Reece wrote:
> trying every which way to make Rose::DB::Object(s) always use my
> custom global $dbh,
>
i have no idea why your package isn't working (i have a few ideas,
but no time to test)
i suggest trying this approach, which is essentially what i do:
trying every which way to make Rose::DB::Object(s) always use my
custom global $dbh,
package Vinq::RDB::MySQL;
use base 'Rose::DB';
use Vinq::Globals qw( $dbh );
__PACKAGE__->use_private_registry;
__PACKAGE__->register_db(driver => 'mysql');
sub dbh { $dbh }
sub driver {
On Feb 8, 2007, at 5:58 PM, John Siracusa wrote:
> On 2/8/07 5:54 PM, Jonathan Vanasco wrote:
>>> Er, that's a "it already is a get/set method in the latest version."
>>
>> http://search.cpan.org/~jsiracusa/Rose-DB-Object/lib/Rose/DB/
>> Object.pm#dbh
>
> Oh, *that* dbh :) That's some old, proba
On Feb 8, 2007, at 5:58 PM, John Siracusa wrote:
> Oh, *that* dbh :)
hence the confusion :)
> That's some old, probably now inappropriate code. I'll
> change it to what the docs say it should be: a proxy for db->dbh()
you should rip out the references to self->{'dbh'} in that class
too. th
On 2/8/07 5:54 PM, Jonathan Vanasco wrote:
>> Er, that's a "it already is a get/set method in the latest version."
>
> http://search.cpan.org/~jsiracusa/Rose-DB-Object/lib/Rose/DB/
> Object.pm#dbh
Oh, *that* dbh :) That's some old, probably now inappropriate code. I'll
change it to what the doc
On Feb 8, 2007, at 5:35 PM, John Siracusa wrote:
> Ah, then yeah, you need to replace all the "db"s with versions that
> don't
> point to anything. If you just remove the "db"s, new ones will be
> created
> on demand (by calling init_db()).
perfect. for my purpose then, i'm just going to
On 2/8/07 5:28 PM, Jonathan Vanasco wrote:
> I want them to have a DB initially.
>
> begin
> fetch
> manipulate, save
> commit / rollback
> kill db
>
> do more stuff that is read only. error out if i try to save
> anything ( no db )
>
> begin
> set db
> load?
> manipulate
> commit rollback
Ah,
On Feb 8, 2007, at 3:50 PM, John Siracusa wrote:
> Is FindMeOn::RoseDB a Rose::DB subclass? If so, it has a dbh()
> method that
> takes an argument:
>
> http://search.cpan.org/dist/Rose-DB/lib/Rose/DB.pm#dbh
>
> No need to be evil and reach into its hash :)
Yes! When I started doing this ,
On 2/8/07 3:00 PM, Jonathan Vanasco wrote:
> sub make__rose_db_obj {
> my ( $dbh )= @_;
> my $rdb_obj= FindMeOn::RoseDB->new();
> $rdb_obj->{'dbh'}= $dbh;
> return $rdb_obj;
> }
Is FindMeOn::RoseDB a Rose::DB subclass? If so, it has a dbh() method that
takes an argument:
http://search.cpan.org
I'm playing around with some application flow ideas, some likely
dangerous.
originally i wanted to do something to the effect of this- create a
customer helper method to destroy the db on a rose object
ie, this part:
bless( {
'__xrdbopriv_in_db' => 1,
15 matches
Mail list logo