Skip Menu |

This queue is for tickets about the UML-Class-Simple CPAN distribution.

Report information
The Basics
Id: 22811
Status: resolved
Priority: 0/
Queue: UML-Class-Simple

People
Owner: Nobody in particular
Requestors: yanick+cpan [...] babyl.dyndns.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.04
Fixed in: (no value)



Subject: one-argument call of classes_from_runtime fails
(before anything else: this is a way cool module. I like it!) Contrary to what the pod says, calling classes_from_runtime without a second argument will fail. I'm attaching a patch that fixes the problem (remove the prototyping on classes_from_runtime) and add a test on basic.t to verify it.
Subject: ucs.patch
diff -r -c UML-Class-Simple-0.04/lib/UML/Class/Simple.pm UML-Class-Simple-yanick/lib/UML/Class/Simple.pm *** UML-Class-Simple-0.04/lib/UML/Class/Simple.pm Wed Nov 1 00:15:44 2006 --- UML-Class-Simple-yanick/lib/UML/Class/Simple.pm Sat Nov 4 13:07:35 2006 *************** *** 21,27 **** my $tt = Template->new; my $dot_template; ! sub classes_from_runtime ($$) { my ($module, $pattern) = @_; $pattern = '' if !defined $pattern; if ($module) { --- 21,27 ---- my $tt = Template->new; my $dot_template; ! sub classes_from_runtime { my ($module, $pattern) = @_; $pattern = '' if !defined $pattern; if ($module) { diff -r -c UML-Class-Simple-0.04/t/basic.t UML-Class-Simple-yanick/t/basic.t *** UML-Class-Simple-0.04/t/basic.t Tue Oct 31 07:07:32 2006 --- UML-Class-Simple-yanick/t/basic.t Sat Nov 4 13:08:00 2006 *************** *** 1,7 **** use strict; use warnings; ! use Test::More tests => 29; use UML::Class::Simple; #use Data::Dumper::Simple; --- 1,7 ---- use strict; use warnings; ! use Test::More tests => 30; use UML::Class::Simple; #use Data::Dumper::Simple; *************** *** 9,14 **** --- 9,17 ---- my (@classes, $painter); + @classes = classes_from_runtime( 'PPI' ); + ok @classes, 'calling classes_from_runtime with one argument'; + @classes = classes_from_runtime("PPI", qr/^PPI::/); ok @classes > 5, 'a lot of PPI classes found';
On Sat Nov 04 13:06:57 2006, YANICK wrote: Show quoted text
> (before anything else: this is a way cool module. I like it!) >
Thanks! :) Show quoted text
> Contrary to what the pod says, calling classes_from_runtime without a > second argument will fail. >
Indeed. Show quoted text
> I'm attaching a patch that fixes the problem (remove the prototyping > on classes_from_runtime) and add a test on basic.t to verify it.
Applied. Thanks for the catch. ;-) Cheers, Agent
I've uploaded UML::Class::Simple 0.05 which ought to have fixed this bug. :)
Subject: Re: [rt.cpan.org #22811] one-argument call of classes_from_runtime fails
Date: Sun, 5 Nov 2006 10:12:06 -0500
To: bug-UML-Class-Simple [...] rt.cpan.org
From: Yanick Champoux <yanick [...] babyl.dyndns.org>
On Sunday 05 November 2006 01:03, via RT wrote: Show quoted text
> > I'm attaching a patch that fixes the problem (remove the prototyping > > on classes_from_runtime) and add a test on basic.t to verify it.
> > Applied. Thanks for the catch. ;-)
You're very welcome, t'was my pleasure. ;-) Joy, `/anick