Sorauta-SVN-AutoCommit
view release on metacpan or search on metacpan
$ssa->execute();
DEPENDENCIES
This module requires these other modules and libraries:
CGI::Carp
Data::Dumper
SVN::Agent
SVN::Agent::Dummy
Image::Magick
Sorauta::Utility
COPYRIGHT AND LICENCE
Put the correct copyright and licence information here.
Copyright (C) 2012 by Yuki ANAI
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.12.3 or,
lib/Sorauta/SVN/AutoCommit.pm view on Meta::CPAN
use base qw/Class::Accessor::Fast/;
use 5.012003;
use strict;
use warnings;
use utf8;
use CGI::Carp qw/fatalsToBrowser/;
use Data::Dumper;
use SVN::Agent;
use SVN::Agent::Dummy;
use Image::Magick;
use Sorauta::Utility;
our $VERSION = '0.02';
# ãµã ãã¤ã«ã®ç¸¦æ¨ª
our($THUMBNAIL_WIDTH, $THUMBNAIL_HEIGHT) = (160, 90);
# ã³ãããæã®ã³ã¡ã³ã
our $COMMIT_COMMENT = "auto commit from Sorauta::SVN::AutoCommit";
lib/Sorauta/SVN/AutoCommit.pm view on Meta::CPAN
# ãµã ãã¤ã«ãçæãã
# req:
# sa: SVN::Agentã®ã¤ã³ã¹ã¿ã³ã¹
# original_file_path: å
ãã¡ã¤ã«ã®ãã¹
# thumbnail_file_path: ãµã ãã¤ã«ãã¡ã¤ã«ã®ãã¹
# res:
# result: null
#==========================================
sub _create_thumbnail_image {
my($self, $sa, $original_file_path, $thumbnail_file_path) = @_;
my $image = Image::Magick->new;
# å
ç»åãèªã¿è¾¼ã
print $image->Read(
$original_file_path
);
# ã¿ãã¨ã³æ¯çæå®
print $image->Resize(
geometry => $self->thumbnail_width.'x'.$self->thumbnail_height
);
t/Sorauta-SVN-AutoCommit.t view on Meta::CPAN
use lib qw/lib/;
use Test::More tests => 4;
BEGIN { use_ok('Sorauta::SVN::AutoCommit') };
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
use_ok('SVN::Agent');
use_ok('Image::Magick');
my $ssa = Sorauta::SVN::AutoCommit->new;
ok($ssa, "create new instance");
# commit test
=pod
{
my $SVN_MODE = "auto_commit";
my $SVN_WORK_DIR = "/Users/user/Desktop/svn_dir";
my $DEBUG = 0;
( run in 1.080 second using v1.01-cache-2.11-cpan-beeb90c9504 )