Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Mocking time with SQLite

by oko1 (Deacon)
on Dec 26, 2010 at 14:54 UTC ( #879215=note: print w/replies, xml ) Need Help??


in reply to Mocking time with SQLite

Based on the 'LD_PRELOAD' example shown at the 'faketime' page, it certainly appears to be a plausible solution. I can't see how you'd use it from within a Perl script, but launching the script with

LD_PRELOAD=/usr/local/lib/libfaketime.so.1 FAKETIME="-15d" ./my_sqlite_script

should do it. (Thanks for the link, BTW; I'm actually going to download it and try it myself - it would solve a couple of minor testing situations for me. :)


-- 
Education is not the filling of a pail, but the lighting of a fire.
 -- W. B. Yeats

Replies are listed 'Best First'.
Re^2: Mocking time with SQLite
by jaldhar (Vicar) on Dec 26, 2010 at 15:04 UTC

    I thought maybe it could be used via some kind of XS wrapper or something. It's a moot point anyway as my alternative approach works now. This is much better as it will be portable to any platform whereas I suspect the preload library is Unix specific only.

    --
    જલધર

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://879215]
help
Chatterbox?
[erix]: another blues with Big Red :)
[stonecolddevin]: I will say John Mayer is an excellent guitarist, I don't like his music but he's pretty damn good
[erix]: scd: maybe you like John Mayall better :)
[erix]: (mayall = british blues)
[planetscape]: sleep well, Corion
[stonecolddevin]: erix seems pretty good, i listened to "So Many Roads" and it was nice. Not everyone's cup of tea but this guy can absolutely shred, he and the guy from Mastodon are definitely up there: https://www. youtube.com/watch? v=VzhMkSN9dQc

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2017-06-22 21:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.