]> eyrie.org Git - kerberos/perl-kerberos.git/commitdiff
Alphabetize functions in Authen::Kerberos::Exception
authorRuss Allbery <eagle@eyrie.org>
Fri, 7 Mar 2014 02:26:41 +0000 (18:26 -0800)
committerRuss Allbery <eagle@eyrie.org>
Fri, 7 Mar 2014 02:26:41 +0000 (18:26 -0800)
lib/Authen/Kerberos/Exception.pm

index 5f0e1a9cdec2e226c29f9c8cfe4545fab28c4d05..af96ead7203460f1557482dec496007bbe1bd0f2 100644 (file)
@@ -56,6 +56,24 @@ sub function { my $self = shift; return $self->{function} }
 sub message  { my $self = shift; return $self->{message} }
 sub code     { my $self = shift; return $self->{code} }
 
+# The cmp implmenetation converts the exception to a string and then compares
+# it to the other argument.
+#
+# $self  - Authen::Kerberos::Exception object
+# $other - The other object (generally a string) to which to compare it
+# $swap  - True if the order needs to be swapped for a proper comparison
+#
+# Returns: -1, 0, or 1 per the cmp interface contract
+sub spaceship {
+    my ($self, $other, $swap) = @_;
+    my $string = $self->to_string;
+    if ($swap) {
+        return ($other cmp $string);
+    } else {
+        return ($string cmp $other);
+    }
+}
+
 # A full verbose message with all the information from the exception.
 #
 # $self - Authen::Kerberos::Exception object
@@ -77,24 +95,6 @@ sub to_string {
     return $result;
 }
 
-# The cmp implmenetation converts the exception to a string and then compares
-# it to the other argument.
-#
-# $self  - Authen::Kerberos::Exception object
-# $other - The other object (generally a string) to which to compare it
-# $swap  - True if the order needs to be swapped for a proper comparison
-#
-# Returns: -1, 0, or 1 per the cmp interface contract
-sub spaceship {
-    my ($self, $other, $swap) = @_;
-    my $string = $self->to_string;
-    if ($swap) {
-        return ($other cmp $string);
-    } else {
-        return ($string cmp $other);
-    }
-}
-
 1;
 
 __END__