=encoding euc-jp =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 これはユーザープラグマです。 もしあなたがとても幸運なら、あなたが使っているコードはあなたが CPU 使用量や RAM や脂肪や…私たちが思いつかないようなものを減らしてほしいと 頼んでいることを知るでしょう。 あなたが今使っている全てのものに関する文書を参照してください。 =begin original For general suggestions, try requesting C or C. =end original 一般的な提案として、C や C を要求してみましょう。 use less 'memory'; use less 'CPU'; use less 'fat'; =begin original If you ask for nothing in particular, you'll be asking for C. =end original 具体的に何も頼まなかった場合、C と頼むことになります。 use less 'please'; =head1 FOR MODULE AUTHORS (モジュール作者へ) =begin original L 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) and now C can do something. =end original L は「ジョーク」モジュールとして長い間コアに入っていて、 誰かに何かの情報を伝えることは全くありませんでした。 Nicholas Clark のおかげで、ユーザープラグマ (L を 参照してください) が実装され、C は何かができるようになりました。 =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 あなたはおそらく、あなたのユーザーが CPU やメモリを少なく、あるいは 全体的に「少なく」要求しているということを推測できるようになると 想定できます。 =begin original If the user didn't specify anything, it's interpreted as having used the C tag. It's up to you to make this useful. =end original もしユーザーが何も指定しなかった場合、C タグが使われた物として 解釈されます。 これが有用かどうかはあなた次第です。 # 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 クラスメソッド C<< less->of( NAME ) >> は、ユーザーが何かを少なくしたいと 要求しているかをあなたにつたえるための真偽値を返します。 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 ( less->of ) { ... } else { ... } =head1 CAVEATS (警告) =over =item This probably does nothing. (これはおそらく何もしません。) =item This works only on 5.10+ (これは 5.10 以降でのみ動作します。) =begin original At least it's backwards compatible in not doing much. =end original 少なくとも何もしないという意味で後方互換性があります。 =back =begin meta Translate: Kentaro Shirakata Status: completed =end meta =cut