Changeset 16240
- Timestamp:
- Jan 25, 2008, 2:16:32 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/lib/Nebulous/Keys.pod (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/lib/Nebulous/Keys.pod
r16238 r16240 1 # neb://<volume name>/... 2 # neb:path... 3 # neb:/path... (same as neb:path, leading '/' is stripped) 4 # neb:///path... (same as neb:path) 1 =pod 5 2 6 key: foo/bar/baz/quix 7 mangled to: foo/bar/baz/quix 8 volume: any 3 =head1 NAME 9 4 10 key: /foo/bar/baz/quix 11 mangled to: foo/bar/baz/quix 12 volume: any 5 Nebulous::Keys - Nebulous Keys Explained 13 6 14 key: //foo/bar/baz/quix 15 mangled to: foo/bar/baz/quix 16 volume: any 7 =head1 DESCRIPTION 17 8 18 key: ///foo/bar/baz/quix 19 mangled to: foo/bar/baz/quix 20 volume: any 9 The Nebulous system interprets it's storage object keys in a I<slightly> 10 magical manner. It supports both plain vanilla C<key strings> and keys in the 11 form of an L<URI>. In the L<URI> form a specific storage volume can be implied 12 (as a request, not a requirement). Both key forms are subject to mangling such 13 that I<IF> the key I<looks> like a C<POSIX> semantics file path, it is 14 canocalized. 21 15 22 key: foo////bar/baz/quix 23 mangled to: foo/bar/baz/quix 24 volume: any 16 =head1 RESERVED SYNTAX 25 17 26 key: foo/bar/baz/quix/ 27 mangled to: foo/bar/baz/quix 28 volume: any 18 This particular syntax is disallowed and is reserved for future use 29 19 30 # URI w/ volume name 20 <neb:<phrase>/<path> 31 21 32 key: neb://foo/bar/baz/quix 33 mangled to: bar/baz/quix 34 volume: foo 22 =head1 EXAMPLES 35 23 36 key: neb://foo//bar/baz/quix 37 mangled to: bar/baz/quix 38 volume: foo 24 =head2 Key Strings 39 25 40 key: neb://foo///bar/baz/quix41 mangled to:bar/baz/quix42 volume: foo 26 key: foo/bar/baz/quix 27 mangled to: foo/bar/baz/quix 28 volume: any 43 29 44 key: neb://foo/bar///baz/quix45 mangled to:bar/baz/quix46 volume: foo 30 key: /foo/bar/baz/quix 31 mangled to: foo/bar/baz/quix 32 volume: any 47 33 48 key: neb://foo/bar/baz/quix/ 49 mangled to:bar/baz/quix50 volume: foo 34 key: //foo/bar/baz/quix 35 mangled to: foo/bar/baz/quix 36 volume: any 51 37 52 # URI w/o volume name 38 key: ///foo/bar/baz/quix 39 mangled to: foo/bar/baz/quix 40 volume: any 53 41 54 key: neb:/foo/bar/baz/quix55 mangled to: foo/bar/baz/quix56 volume: any42 key: foo////bar/baz/quix 43 mangled to: foo/bar/baz/quix 44 volume: any 57 45 58 key: neb:///foo/bar/baz/quix 59 mangled to: foo/bar/baz/quix60 volume: any46 key: foo/bar/baz/quix/ 47 mangled to: foo/bar/baz/quix 48 volume: any 61 49 62 key: neb://///foo/bar/baz/quix 63 mangled to: foo/bar/baz/quix 64 volume: any 50 =head2 URI w/ volume name 65 51 66 # key w/ whitespace 52 neb://<volume>/<path> 67 53 68 like( $@, qr/may not contain whitespace/, "whitespace" ); 69 "/ foo/bar/baz/quix" 70 " /foo/bar/baz/quix" 71 "/foo/bar/baz/quix " 54 key: neb://foo/bar/baz/quix 55 mangled to: bar/baz/quix 56 volume: foo 72 57 73 # URI w/ whitespace 58 key: neb://foo//bar/baz/quix 59 mangled to: bar/baz/quix 60 volume: foo 74 61 75 "neb ://foo/bar/baz/quix" 76 "neb:// foo/bar/baz/quix" 77 " neb://foo/bar/baz/quix" 78 "neb://foo/bar/baz/quix " 62 key: neb://foo///bar/baz/quix 63 mangled to: bar/baz/quix 64 volume: foo 79 65 80 # URI w/o volume requires leading slash 66 key: neb://foo/bar///baz/quix 67 mangled to: bar/baz/quix 68 volume: foo 81 69 82 like( $@, qr/requires a leading slash/, "leading slash" ); 83 neb:foo/bar/baz/quix 70 key: neb://foo/bar/baz/quix/ 71 mangled to: bar/baz/quix 72 volume: foo 73 74 =head2 URI w/o volume name 75 76 neb:/<path> 77 78 key: neb:/foo/bar/baz/quix 79 mangled to: foo/bar/baz/quix 80 volume: any 81 82 key: neb:///foo/bar/baz/quix 83 mangled to: foo/bar/baz/quix 84 volume: any 85 86 key: neb://///foo/bar/baz/quix 87 mangled to: foo/bar/baz/quix 88 volume: any 89 90 =head2 Forbidden Keys 91 92 =head3 Key with whitespace 93 94 "/ foo/bar/baz/quix" 95 " /foo/bar/baz/quix" 96 "/foo/bar/baz/quix " 97 98 =head3 URI with whitespace 99 100 "neb ://foo/bar/baz/quix" 101 "neb:// foo/bar/baz/quix" 102 " neb://foo/bar/baz/quix" 103 "neb://foo/bar/baz/quix " 104 105 =head3 URI with out a volume requires a leading slash 106 107 neb:foo/bar/baz/quix 108 109 =head1 CREDITS 110 111 Just me, myself, and I. 112 113 =head1 SUPPORT 114 115 Please contact the author directly via e-mail. 116 117 =head1 AUTHOR 118 119 Joshua Hoblitt <jhoblitt@cpan.org> 120 121 =head1 COPYRIGHT 122 123 Copyright (C) 2008 Joshua Hoblitt. All rights reserved. 124 125 This program is free software; you can redistribute it and/or modify it under 126 the terms of the GNU General Public License as published by the Free Software 127 Foundation; either version 2 of the License, or (at your option) any later 128 version. 129 130 This program is distributed in the hope that it will be useful, but WITHOUT ANY 131 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 132 PARTICULAR PURPOSE. See the GNU General Public License for more details. 133 134 You should have received a copy of the GNU General Public License along with 135 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 136 Place - Suite 330, Boston, MA 02111-1307, USA. 137 138 The full text of the license can be found in the LICENSE file included with 139 this module, or in the L<perlgpl> Pod as supplied with Perl 5.8.1 and later. 140 141 =head1 SEE ALSO 142 143 L<Nebulous::Server>, L<Nebulous::Client>, L<nebclient(3)> 144 145 =cut
Note:
See TracChangeset
for help on using the changeset viewer.
