Index: trunk/BookmarkApp.pm
===================================================================
--- trunk/BookmarkApp.pm	(revision 27)
+++ trunk/BookmarkApp.pm	(revision 30)
@@ -31,4 +31,5 @@
         feed
         view
+        view_field
         edit
     }]);
@@ -229,51 +230,64 @@
     my $self = shift;
     my $id = $self->param('id');
-    my $field = $self->param('field');
     my $format = $self->query->param('format') || 'html';
 
     my $bookmark = $bookmarks->get_bookmark({ id => $id });
     if ($bookmark) {
-        if ($field) {
-            # respond with just the requested field as plain text
-            my $value = eval { $bookmark->$field };
-            if ($@) {
-                if ($@ =~ /Can't locate object method/) {
-                    $self->header_props(
-                        -type    => 'text/plain',
-                        -charset => 'UTF-8',
-                        -status  => 404,
-                    );
-                    return qq{"$field" is not a valid bookmark data field};
-                } else {
-                    die $@;
-                }
+        if ($format eq 'json') {
+            $self->header_props(
+                -type    => 'application/json',
+                -charset => 'UTF-8',
+            );
+            return decode_utf8(JSON->new->utf8->convert_blessed->encode($bookmark));
+        } else {
+            # display the bookmark form for this bookmark
+            $bookmark->{exists} = 1;
+            $bookmark->{created} = "Created " . localtime($bookmark->ctime);
+            $bookmark->{created} .= '; Updated ' . localtime($bookmark->mtime) unless $bookmark->ctime == $bookmark->mtime;
+            $self->header_props(
+                -type    => 'text/html',
+                -charset => 'UTF-8',
+            );
+            return $self->tt_process(
+                'bookmark.tt',
+                $bookmark,
+            );
+        }
+    } else {
+        $self->header_props(
+            -type    => 'text/html',
+            -charset => 'UTF-8',
+            -status  => 404,
+        );
+        return "Bookmark $id Not Found";
+    }
+}
+
+sub view_field {
+    my $self = shift;
+    my $id = $self->param('id');
+    my $field = $self->param('field');
+
+    my $bookmark = $bookmarks->get_bookmark({ id => $id });
+    if ($bookmark) {
+        # respond with just the requested field as plain text
+        my $value = eval { $bookmark->$field };
+        if ($@) {
+            if ($@ =~ /Can't locate object method/) {
+                $self->header_props(
+                    -type    => 'text/plain',
+                    -charset => 'UTF-8',
+                    -status  => 404,
+                );
+                return qq{"$field" is not a valid bookmark data field};
+            } else {
+                die $@;
             }
-            $self->header_props(
-                -type    => 'text/plain',
-                -charset => 'UTF-8',
-            );
-            return ref $value eq 'ARRAY' ? join(',', @{ $value }) : $value;
-        } else {
-            if ($format eq 'json') {
-                $self->header_props(
-                    -type    => 'application/json',
-                    -charset => 'UTF-8',
-                );
-                return decode_utf8(JSON->new->utf8->convert_blessed->encode($bookmark));
-            } else {
-                # display the bookmark form for this bookmark
-                $bookmark->{exists} = 1;
-                $bookmark->{created} = "Created " . localtime($bookmark->ctime);
-                $bookmark->{created} .= '; Updated ' . localtime($bookmark->mtime) unless $bookmark->ctime == $bookmark->mtime;
-                $self->header_props(
-                    -type    => 'text/html',
-                    -charset => 'UTF-8',
-                );
-                return $self->tt_process(
-                    'bookmark.tt',
-                    $bookmark,
-                );
-            }
-        }
+        }
+        $self->header_props(
+            -type    => 'text/plain',
+            -charset => 'UTF-8',
+        );
+        return ref $value eq 'ARRAY' ? join(',', @{ $value }) : $value;
     } else {
         $self->header_props(
