r75056 - in /branches/upstream/libgraphics-primitive-perl/current: ./ inc/Module/ inc/Module/Install/ lib/Graphics/ lib/Graphics/Primitive/ t/
ansgar at users.alioth.debian.org
ansgar at users.alioth.debian.org
Thu Jun 2 16:38:37 UTC 2011
Author: ansgar
Date: Thu Jun 2 16:38:30 2011
New Revision: 75056
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=75056
Log:
[svn-upgrade] new version libgraphics-primitive-perl (0.61)
Added:
branches/upstream/libgraphics-primitive-perl/current/t/callback.t
Modified:
branches/upstream/libgraphics-primitive-perl/current/Changes
branches/upstream/libgraphics-primitive-perl/current/MANIFEST
branches/upstream/libgraphics-primitive-perl/current/META.yml
branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install.pm
branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Base.pm
branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Can.pm
branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Fetch.pm
branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Win32.pm
branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/WriteAll.pm
branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive.pm
branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive/Component.pm
Modified: branches/upstream/libgraphics-primitive-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/Changes?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/Changes (original)
+++ branches/upstream/libgraphics-primitive-perl/current/Changes Thu Jun 2 16:38:30 2011
@@ -1,8 +1,14 @@
Revision history for Graphics-Primitive
+
+0.61 Jun 2, 2011
+ - Fix broken merge (thanks Ansgar Burchardt)
0.60 May 5, 2011
- If minimum_width or minimum_height is set, don't allow height or width to
be set to anything smaller!
+
+0.53 Feb 18, 2011
+ - Add callback to Component
0.52 Aug 21, 2010
- POD updates
Modified: branches/upstream/libgraphics-primitive-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/MANIFEST?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/MANIFEST (original)
+++ branches/upstream/libgraphics-primitive-perl/current/MANIFEST Thu Jun 2 16:38:30 2011
@@ -53,4 +53,5 @@
t/80-serialize.t
t/author/pod-coverage.t
t/author/pod.t
+t/callback.t
t/lib/DummyDriver.pm
Modified: branches/upstream/libgraphics-primitive-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/META.yml?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/META.yml (original)
+++ branches/upstream/libgraphics-primitive-perl/current/META.yml Thu Jun 2 16:38:30 2011
@@ -9,7 +9,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 1.00'
+generated_by: 'Module::Install version 1.01'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -30,4 +30,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: git://github.com/gphat/graphics-primitive.git
-version: 0.60
+version: 0.61
Modified: branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install.pm Thu Jun 2 16:38:30 2011
@@ -31,7 +31,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.00';
+ $VERSION = '1.01';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -467,4 +467,4 @@
1;
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2011 Adam Kennedy.
Modified: branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Base.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Base.pm Thu Jun 2 16:38:30 2011
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
}
# Suspend handler for "redefined" warnings
Modified: branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Can.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Can.pm Thu Jun 2 16:38:30 2011
@@ -9,7 +9,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Fetch.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Fetch.pm Thu Jun 2 16:38:30 2011
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Makefile.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Makefile.pm Thu Jun 2 16:38:30 2011
@@ -8,7 +8,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Metadata.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Metadata.pm Thu Jun 2 16:38:30 2011
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -515,6 +515,7 @@
'GNU Free Documentation license' => 'unrestricted', 1,
'GNU Affero General Public License' => 'open_source', 1,
'(?:Free)?BSD license' => 'bsd', 1,
+ 'Artistic license 2\.0' => 'artistic_2', 1,
'Artistic license' => 'artistic', 1,
'Apache (?:Software )?license' => 'apache', 1,
'GPL' => 'gpl', 1,
@@ -550,9 +551,9 @@
sub _extract_bugtracker {
my @links = $_[0] =~ m#L<(
- \Qhttp://rt.cpan.org/\E[^>]+|
- \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
- \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+ https?\Q://rt.cpan.org/\E[^>]+|
+ https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+ https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
)>#gx;
my %links;
@links{@links}=();
Modified: branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Win32.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/Win32.pm Thu Jun 2 16:38:30 2011
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/WriteAll.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/inc/Module/Install/WriteAll.pm Thu Jun 2 16:38:30 2011
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive.pm Thu Jun 2 16:38:30 2011
@@ -1,7 +1,7 @@
package Graphics::Primitive;
use Moose;
-our $VERSION = '0.60';
+our $VERSION = '0.61';
__PACKAGE__->meta->make_immutable;
Modified: branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive/Component.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive/Component.pm?rev=75056&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive/Component.pm (original)
+++ branches/upstream/libgraphics-primitive-perl/current/lib/Graphics/Primitive/Component.pm Thu Jun 2 16:38:30 2011
@@ -22,6 +22,15 @@
isa => 'Graphics::Primitive::Border',
default => sub { Graphics::Primitive::Border->new },
trigger => sub { my ($self) = @_; $self->prepared(0); }
+);
+has 'callback' => (
+ traits => ['Code'],
+ is => 'rw',
+ isa => 'CodeRef',
+ predicate => 'has_callback',
+ handles => {
+ fire_callback => 'execute'
+ }
);
has 'class' => ( is => 'rw', isa => 'Str' );
has 'color' => (
@@ -209,7 +218,11 @@
return $w;
}
-sub finalize { }
+sub finalize {
+ my ($self) = @_;
+
+ $self->fire_callback($self) if $self->has_callback;
+}
sub prepare {
my ($self, $driver) = @_;
@@ -328,6 +341,16 @@
Set this component's border, which should be an instance of
L<Border|Graphics::Primitive::Border>.
+=item I<callback>
+
+Optional callback that is fired at the beginning of the C<finalize> phase.
+This allows you to add some sort of custom code that can modify the component
+just before it is rendered. The only argument is the component itself.
+
+Note that changing the position or the dimensions of the component will B<not>
+re-layout the scene. You may have weird results of you manipulate the
+component's dimensions here.
+
=item I<class>
Set/Get this component's class, which is an abitrary string.
@@ -338,10 +361,18 @@
Set this component's foreground color.
+=item I<fire_callback>
+
+Method to execute this component's C<callback>.
+
=item I<get_tree>
Get a tree for this component. Since components are -- by definiton -- leaf
nodes, this tree will only have the one member at it's root.
+
+=item I<has_callback>
+
+Predicate that tells if this component has a C<callback>.
=item I<height>
Added: branches/upstream/libgraphics-primitive-perl/current/t/callback.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libgraphics-primitive-perl/current/t/callback.t?rev=75056&op=file
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/t/callback.t (added)
+++ branches/upstream/libgraphics-primitive-perl/current/t/callback.t Thu Jun 2 16:38:30 2011
@@ -1,0 +1,34 @@
+use lib 't/lib', 'lib';
+use strict;
+
+use Test::More;
+
+use Graphics::Primitive::Component;
+use Graphics::Primitive::Container;
+
+BEGIN {
+ use_ok('Graphics::Primitive::Driver');
+ use_ok('DummyDriver');
+}
+
+my $driver = DummyDriver->new;
+isa_ok($driver, 'DummyDriver');
+
+my $container = Graphics::Primitive::Container->new(class => 'container');
+my $comp = Graphics::Primitive::Component->new(class => 'component');
+my $comp_call = 0;
+$comp->callback(sub { $comp_call = $_[0]->class });
+
+$container->add_component($comp, 'c');
+
+my $cont_call = 0;
+use Data::Dumper;
+$container->callback(sub { $cont_call = $_[0]->class });
+
+$driver->prepare($container);
+$driver->finalize($container);
+
+cmp_ok($cont_call, 'eq', 'container', 'container callback fired');
+cmp_ok($comp_call, 'eq', 'component', 'component callback fired');
+
+done_testing;
More information about the Pkg-perl-cvs-commits
mailing list