/[fuse_dbi]/trunk/t/02database.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/t/02database.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (hide annotations)
Sun Aug 29 18:51:29 2004 UTC (19 years, 7 months ago) by dpavlin
File MIME type: application/x-troff
File size: 702 byte(s)
first try at making this module (late commit)

1 dpavlin 11 #!/usr/bin/perl -w
2    
3     use strict;
4     use warnings;
5    
6     use Test::More tests => 3;
7     use blib;
8    
9     use_ok('Fuse::DBI');
10    
11     my $sql_filenames = q{
12     select
13     oid as id,
14     namespace||'/'||name||' ['||oid||']' as filename,
15     length(template) as size,
16     iseditable as writable
17     from template ;
18     };
19    
20     my $sql_read = q{
21     select template
22     from template
23     where oid = ?;
24     };
25    
26     my $sql_update = q{
27     update template
28     set template = ?
29     where oid = ?;
30     };
31    
32     my $mnt = Fuse::DBI->mount({
33     filenames => $sql_filenames,
34     read => $sql_read,
35     update => $sql_update,
36     dsn => 'DBI:Pg:dbname=webgui',
37     mount => '/mnt2',
38     });
39    
40     ok($mnt, "mount");
41    
42     diag "mounted sleeping for 5 sec";
43     system "ls -lR /mnt2";
44     sleep(5);
45    
46     ok($mnt->umount,"umount");

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26