[perldocjp-cvs 1579] CVS update: docs/modules/less-0.02

Back to archive index

argra****@users***** argra****@users*****
2012年 10月 10日 (水) 03:42:01 JST


Index: docs/modules/less-0.02/less.pod
diff -u /dev/null docs/modules/less-0.02/less.pod:1.1
--- /dev/null	Wed Oct 10 03:42:01 2012
+++ docs/modules/less-0.02/less.pod	Wed Oct 10 03:42:01 2012
@@ -0,0 +1,166 @@
+
+=head1 NAME
+
+=begin original
+
+less - perl pragma to request less of something
+
+=end original
+
+less - より少ない何かを要求する
+
+=head1 SYNOPSIS
+
+    use less 'CPU';
+
+=head1 DESCRIPTION
+
+=begin original
+
+This is a user-pragma. If you're very lucky some code you're using
+will know that you asked for less CPU usage or ram or fat or... we
+just can't know. Consult your documentation on everything you're
+currently using.
+
+=end original
+
+This is a user-pragma. If you're very lucky some code you're using
+will know that you asked for less CPU usage or ram or fat or... we
+just can't know. Consult your documentation on everything you're
+currently using.
+(TBT)
+
+=begin original
+
+For general suggestions, try requesting C<CPU> or C<memory>.
+
+=end original
+
+For general suggestions, try requesting C<CPU> or C<memory>.
+(TBT)
+
+    use less 'memory';
+    use less 'CPU';
+    use less 'fat';
+
+=begin original
+
+If you ask for nothing in particular, you'll be asking for C<less
+'please'>.
+
+=end original
+
+If you ask for nothing in particular, you'll be asking for C<less
+'please'>.
+(TBT)
+
+    use less 'please';
+
+=head1 FOR MODULE AUTHORS
+
+=begin original
+
+L<less> has been in the core as a "joke" module for ages now and it
+hasn't had any real way to communicating any information to
+anything. Thanks to Nicholas Clark we have user pragmas (see
+L<perlpragma>) and now C<less> can do something.
+
+=end original
+
+L<less> has been in the core as a "joke" module for ages now and it
+hasn't had any real way to communicating any information to
+anything. Thanks to Nicholas Clark we have user pragmas (see
+L<perlpragma>) and now C<less> can do something.
+(TBT)
+
+=begin original
+
+You can probably expect your users to be able to guess that they can
+request less CPU or memory or just "less" overall.
+
+=end original
+
+You can probably expect your users to be able to guess that they can
+request less CPU or memory or just "less" overall.
+(TBT)
+
+=begin original
+
+If the user didn't specify anything, it's interpreted as having used
+the C<please> tag. It's up to you to make this useful.
+
+=end original
+
+If the user didn't specify anything, it's interpreted as having used
+the C<please> tag. It's up to you to make this useful.
+(TBT)
+
+  # equivalent
+  use less;
+  use less 'please';
+
+=head2 C<< BOOLEAN = less->of( FEATURE ) >>
+
+=begin original
+
+The class method C<< less->of( NAME ) >> returns a boolean to tell you
+whether your user requested less of something.
+
+=end original
+
+The class method C<< less->of( NAME ) >> returns a boolean to tell you
+whether your user requested less of something.
+(TBT)
+
+  if ( less->of( 'CPU' ) ) {
+      ...
+  }
+  elsif ( less->of( 'memory' ) ) {
+
+  }
+
+=head2 C<< FEATURES = less->of() >>
+
+=begin original
+
+If you don't ask for any feature, you get the list of features that
+the user requested you to be nice to. This has the nice side effect
+that if you don't respect anything in particular then you can just ask
+for it and use it like a boolean.
+
+=end original
+
+If you don't ask for any feature, you get the list of features that
+the user requested you to be nice to. This has the nice side effect
+that if you don't respect anything in particular then you can just ask
+for it and use it like a boolean.
+(TBT)
+
+  if ( less->of ) {
+      ...
+  }
+  else {
+      ...
+  }
+
+=head1 CAVEATS
+
+=over
+
+=item This probably does nothing.
+
+=item This works only on 5.10+
+
+=begin original
+
+At least it's backwards compatible in not doing much.
+
+=end original
+
+At least it's backwards compatible in not doing much.
+(TBT)
+
+=back
+
+=cut
+



perldocjp-cvs メーリングリストの案内
Back to archive index