summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Ollis <plicease@cpan.org>2019-03-27 17:13:02 -0400
committerGraham Ollis <plicease@cpan.org>2019-03-27 17:13:02 -0400
commite6298a245ce1cd5ff87ecab12fe66486f3377010 (patch)
tree625039e7a9b227d9831ce8636a219b7a74218ccf
parentf5723f9407fcc4d0b3bf7595f016f98d39ad4018 (diff)
remove whitespace
-rw-r--r--README.md10
-rw-r--r--lib/Class/Inspector.pm22
-rw-r--r--t/02_main.t16
-rw-r--r--t/04_main_functions.t8
4 files changed, 28 insertions, 28 deletions
diff --git a/README.md b/README.md
index 92e8f01..1934f97 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Get information about a class and its structure
Class::Inspector allows you to get information about a loaded class. Most or
all of this information can be found in other ways, but they aren't always
very friendly, and usually involve a relatively high level of Perl wizardry,
-or strange and unusual looking code. Class::Inspector attempts to provide
+or strange and unusual looking code. Class::Inspector attempts to provide
an easier, more friendly interface to this information.
# METHODS
@@ -166,7 +166,7 @@ order.
- public
The `public` option will return only 'public' methods, as defined by the Perl
- convention of prepending an underscore to any 'private' methods. The `public`
+ convention of prepending an underscore to any 'private' methods. The `public`
option will effectively remove any methods that start with an underscore.
- private
@@ -187,12 +187,12 @@ order.
- expanded
- The `expanded` option will cause a lot more information about method to be
+ The `expanded` option will cause a lot more information about method to be
returned. Instead of just the method name, you will instead get an array
reference containing the method name as a single combined name, a la `full`,
the separate class and method, and a CODE ref to the actual function ( if
- available ). Please note that the function reference is not guaranteed to
- be available. `Class::Inspector` is intended at some later time, to work
+ available ). Please note that the function reference is not guaranteed to
+ be available. `Class::Inspector` is intended at some later time, to work
with modules that have some kind of common run-time loader in place ( e.g
`Autoloader` or `Class::Autouse` for example.
diff --git a/lib/Class/Inspector.pm b/lib/Class/Inspector.pm
index 1612770..c295a09 100644
--- a/lib/Class/Inspector.pm
+++ b/lib/Class/Inspector.pm
@@ -36,7 +36,7 @@ use File::Spec ();
Class::Inspector allows you to get information about a loaded class. Most or
all of this information can be found in other ways, but they aren't always
very friendly, and usually involve a relatively high level of Perl wizardry,
-or strange and unusual looking code. Class::Inspector attempts to provide
+or strange and unusual looking code. Class::Inspector attempts to provide
an easier, more friendly interface to this information.
=head1 METHODS
@@ -80,7 +80,7 @@ or C<undef> if the class name is invalid.
sub _resolved_inc_handler {
my $class = shift;
my $filename = $class->_inc_filename(shift) or return undef;
-
+
foreach my $inc ( @INC ) {
my $ref = ref $inc;
if($ref eq 'CODE') {
@@ -102,7 +102,7 @@ sub _resolved_inc_handler {
}
}
}
-
+
'';
}
@@ -367,7 +367,7 @@ order.
=item public
The C<public> option will return only 'public' methods, as defined by the Perl
-convention of prepending an underscore to any 'private' methods. The C<public>
+convention of prepending an underscore to any 'private' methods. The C<public>
option will effectively remove any methods that start with an underscore.
=item private
@@ -388,12 +388,12 @@ C<[ 'Class::method1', 'AnotherClass::method2', 'Class::method3' ]>.
=item expanded
-The C<expanded> option will cause a lot more information about method to be
+The C<expanded> option will cause a lot more information about method to be
returned. Instead of just the method name, you will instead get an array
reference containing the method name as a single combined name, a la C<full>,
the separate class and method, and a CODE ref to the actual function ( if
-available ). Please note that the function reference is not guaranteed to
-be available. C<Class::Inspector> is intended at some later time, to work
+available ). Please note that the function reference is not guaranteed to
+be available. C<Class::Inspector> is intended at some later time, to work
with modules that have some kind of common run-time loader in place ( e.g
C<Autoloader> or C<Class::Autouse> for example.
@@ -466,7 +466,7 @@ sub methods {
foreach my $namespace ( @path ) {
my @functions = grep { ! $methods{$_} }
grep { /$RE_IDENTIFIER/o }
- grep { defined &{"${namespace}::$_"} }
+ grep { defined &{"${namespace}::$_"} }
keys %{"${namespace}::"};
foreach ( @functions ) {
$methods{$_} = $namespace;
@@ -480,8 +480,8 @@ sub methods {
# Return in the correct format
@methodlist = map { "$methods{$_}::$_" } @methodlist if $options{full};
- @methodlist = map {
- [ "$methods{$_}::$_", $methods{$_}, $_, \&{"$methods{$_}::$_"} ]
+ @methodlist = map {
+ [ "$methods{$_}::$_", $methods{$_}, $_, \&{"$methods{$_}::$_"} ]
} @methodlist if $options{expanded};
\@methodlist;
@@ -585,7 +585,7 @@ sub recursive_children {
my $name = $class->_class(shift) or return ();
my @children = ( $name );
- # Do the search using a nicer, more memory efficient
+ # Do the search using a nicer, more memory efficient
# variant of actual recursion.
my $i = 0;
no strict 'refs';
diff --git a/t/02_main.t b/t/02_main.t
index 9850a5f..3b38a09 100644
--- a/t/02_main.t
+++ b/t/02_main.t
@@ -248,21 +248,21 @@ ok( ! CI->methods( BAD ), "Expanded ->methods fails correctly" );
# Create the classes to use
CLASSES: {
package Foo;
-
+
sub foo { 1 };
-
+
package Foo::Subclass;
-
+
@Foo::Subclass::ISA = 'Foo';
-
+
package Bar;
-
+
@Bar::ISA = 'Foo';
-
+
package This;
-
+
sub isa { $_[1] eq 'Foo' ? 1 : undef }
-
+
1;
}
diff --git a/t/04_main_functions.t b/t/04_main_functions.t
index 03f0918..ef35359 100644
--- a/t/04_main_functions.t
+++ b/t/04_main_functions.t
@@ -66,7 +66,7 @@ ok( ($filename eq $inc_filename or index( resolved_filename(CI), $inc_filename )
unshift @INC, sub {
my $coderef = shift;
my $filename = shift;
-
+
if ($filename eq 'Foo/Bar.pm') {
open my $fh, '<', __FILE__;
return (undef, $fh);
@@ -74,12 +74,12 @@ unshift @INC, sub {
return
};
-unshift @INC, [ sub {
+unshift @INC, [ sub {
my $arrayref = shift;
my $filename = shift;
die "args wrong" unless
- ref($arrayref->[0]) eq 'CODE'
+ ref($arrayref->[0]) eq 'CODE'
&& $arrayref->[1] == 1
&& $arrayref->[2] == 2
&& $arrayref->[3] == 3;
@@ -111,7 +111,7 @@ sub new {
sub MyHook::INC {
my($self, $filename) = @_;
die "self wrong" unless ref $self eq 'MyHook';
-
+
if($filename eq 'Foo/Foo.pm') {
open my $fh, '<', __FILE__;
return $fh;