Commits

Toby Inkster committed 48f6f68

support apostrophes in package names

Comments (0)

Files changed (4)

-use inc::Module::Package 'RDF 0.009';
+use inc::Module::Package 'RDF:tobyink 0.009';
 
 
 BEGIN {
 	$thanks::AUTHORITY = 'cpan:TOBYINK';
-	$thanks::VERSION   = '0.001';	
+	$thanks::VERSION   = '0.002';
 }
 
 sub _module_notional_filename
 {
-	(my $name = shift) =~ s!::!/!g;
+	(my $name = shift) =~ s!(::|')!/!g;
 	return $name . q[.pm];
 }
 
 	my @caller = caller(0);
 	@_ = $caller[0] unless @_;
 	my $file = $caller[1];
-	foreach my $module (@_)
+	for my $module (@_)
 		{ $INC{ _module_notional_filename($module) } = $file }
 }
 

meta/changes.pret

 	issued  2012-09-07;
 	label   "Initial release".
 
+`thanks 0.002 cpan:TOBYINK`
+	issued  2012-10-04;
+	label   "Ten Four";
+	changeset [
+		item "Allow old-style Foo'Bar'Baz package names."^^Change;
+	].

t/04apostrophes.t

+use Test::More tests => 1;
+no thanks "Foo'Bar";
+is($INC{'Foo/Bar.pm'}, __FILE__);