[prev] [thread] [next] [lurker] [Date index for 2003/10/17]
Author: richardc Date: 2003-10-17 17:04:15 +0100 (Fri, 17 Oct 2003) New Revision: 1444 Modified: trunk/Siesta-Integrate-Postfix/ trunk/Siesta-Integrate-Postfix/Build.PL trunk/Siesta-Integrate-Postfix/lib/Siesta/Integrate/Postfix.pm trunk/Siesta-Integrate-Postfix/t/ trunk/Siesta-Integrate-Postfix/t/postfix.t Log: go spiderbaby go Property changes on: trunk/Siesta-Integrate-Postfix ___________________________________________________________________ Name: svn:ignore + Build blib _build Modified: trunk/Siesta-Integrate-Postfix/Build.PL =================================================================== --- trunk/Siesta-Integrate-Postfix/Build.PL 2003-10-17 15:53:03 UTC (rev 1443) +++ trunk/Siesta-Integrate-Postfix/Build.PL 2003-10-17 16:04:15 UTC (rev 1444) @@ -5,10 +5,10 @@ module_name => "Siesta::Integrate::Postfix", license => 'perl', build_requires => { - 'Test::More' => 0, + 'Test::More' => 0, }, requires => { - 'Siesta' => 0.6, + 'Siesta' => 0.7, }, create_makefile_pl => 'passthrough', )->create_build_script; Modified: trunk/Siesta-Integrate-Postfix/lib/Siesta/Integrate/Postfix.pm =================================================================== --- trunk/Siesta-Integrate-Postfix/lib/Siesta/Integrate/Postfix.pm 2003-10-17 15:53:03 UTC (rev 1443) +++ trunk/Siesta-Integrate-Postfix/lib/Siesta/Integrate/Postfix.pm 2003-10-17 16:04:15 UTC (rev 1444) @@ -1,6 +1,31 @@ use strict; package Siesta::Integrate::Postfix; +use Siesta::Config qw( $config ); +use Siesta::List; our $VERSION = '0.01'; +# try not, do +sub do { + my $self = shift; + my $alias_file = $config->root . "/postfix.aliases"; + open my $fh, ">$alias_file" or die "couldn't open $alias_file: $!"; + for my $list ( Siesta::List->retrieve_all ) { + print $fh $list->alias; + } + return 1; +} + 1; + +__END__ + +=head1 NAME + +Siesta::Integrate::Postfix - integrate with postfix aliases + +=head1 SYNOPSIS + +I'll tell you later. + +=head1 Property changes on: trunk/Siesta-Integrate-Postfix/t ___________________________________________________________________ Name: svn:ignore + test.db postfix.aliases Modified: trunk/Siesta-Integrate-Postfix/t/postfix.t =================================================================== --- trunk/Siesta-Integrate-Postfix/t/postfix.t 2003-10-17 15:53:03 UTC (rev 1443) +++ trunk/Siesta-Integrate-Postfix/t/postfix.t 2003-10-17 16:04:15 UTC (rev 1444) @@ -1,4 +1,22 @@ #!perl -w use strict; -use Test::More tests => 1; +use Test::More tests => 3; +use Siesta::Test 'init_db'; +use Siesta::Config qw( $config ); +use Siesta::List; + require_ok( "Siesta::Integrate::Postfix" ); +$config->root('t'); + +Siesta::List->create({ + name => 'testlist', + owner => Siesta::Member->create({ + email => 'test@test', + }), +}); + +my $filename = $config->root . "/postfix.aliases"; +unlink $filename; +ok( Siesta::Integrate::Postfix->do, "we can do" ); +ok( -e $filename, "we maded a file" ); +
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52