r75037 - in /branches/upstream/libgraphics-primitive-perl/current: Changes MANIFEST META.yml lib/Graphics/Primitive.pm lib/Graphics/Primitive/Component.pm t/callback.t

ansgar at users.alioth.debian.org ansgar at users.alioth.debian.org
Thu Jun 2 11:36:12 UTC 2011


Author: ansgar
Date: Thu Jun  2 11:36:04 2011
New Revision: 75037

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=75037
Log:
[svn-upgrade] new version libgraphics-primitive-perl (0.60)

Removed:
    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/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=75037&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/Changes (original)
+++ branches/upstream/libgraphics-primitive-perl/current/Changes Thu Jun  2 11:36:04 2011
@@ -1,7 +1,8 @@
 Revision history for Graphics-Primitive
 
-0.53    Feb 18, 2011
-  - Add callback to Component
+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.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=75037&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/MANIFEST (original)
+++ branches/upstream/libgraphics-primitive-perl/current/MANIFEST Thu Jun  2 11:36:04 2011
@@ -53,5 +53,4 @@
 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=75037&op=diff
==============================================================================
--- branches/upstream/libgraphics-primitive-perl/current/META.yml (original)
+++ branches/upstream/libgraphics-primitive-perl/current/META.yml Thu Jun  2 11:36:04 2011
@@ -30,4 +30,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/gphat/graphics-primitive.git
-version: 0.53
+version: 0.60

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=75037&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 11:36:04 2011
@@ -1,7 +1,7 @@
 package Graphics::Primitive;
 use Moose;
 
-our $VERSION = '0.53';
+our $VERSION = '0.60';
 
 __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=75037&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 11:36:04 2011
@@ -23,15 +23,6 @@
     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' => (
     is => 'rw', isa => 'Graphics::Color',
@@ -42,7 +33,7 @@
     is => 'rw',
     isa => 'Num',
     default => sub { 0 },
-    trigger => sub { my ($self) = @_; $self->prepared(0); }
+    trigger => sub { my ($self) = @_; $self->prepared(0); if($self->height < $self->minimum_height) { $self->height($self->minimum_height); } }
 );
 has 'margins' => (
     is => 'rw',
@@ -89,7 +80,7 @@
     is => 'rw',
     isa => 'Num',
     default => sub { 0 },
-    trigger => sub { my ($self) = @_; $self->prepared(0); }
+    trigger => sub { my ($self) = @_; $self->prepared(0); if($self->width < $self->minimum_width) { $self->width($self->minimum_width); } }
 );
 
 sub get_tree {
@@ -218,11 +209,7 @@
     return $w;
 }
 
-sub finalize {
-    my ($self) = @_;
-
-    $self->fire_callback($self) if $self->has_callback;
-}
+sub finalize { }
 
 sub prepare {
     my ($self, $driver) = @_;
@@ -341,16 +328,6 @@
 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.
@@ -361,18 +338,10 @@
 
 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>
 
@@ -507,4 +476,4 @@
 Copyright 2008-2009 by Cory G Watson.
 
 This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
+under the same terms as Perl itself.




More information about the Pkg-perl-cvs-commits mailing list