summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl.straw/lib/Pod/Simple/TiedOutFH.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-03-01 01:54:19 +0000
committerNorbert Preining <preining@logic.at>2010-03-01 01:54:19 +0000
commit904fd0757fe037dbfbf156b31f72e5ff5c7cd796 (patch)
tree36f000ab754854574aad17c01d9cd9ac739f1053 /Master/tlpkg/tlperl.straw/lib/Pod/Simple/TiedOutFH.pm
parent402bd194f686177d2dfca24f7c4766434c514141 (diff)
commit more files of the tlperl.straw dir, still not complete
git-svn-id: svn://tug.org/texlive/trunk@17244 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl.straw/lib/Pod/Simple/TiedOutFH.pm')
-rwxr-xr-xMaster/tlpkg/tlperl.straw/lib/Pod/Simple/TiedOutFH.pm105
1 files changed, 105 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl.straw/lib/Pod/Simple/TiedOutFH.pm b/Master/tlpkg/tlperl.straw/lib/Pod/Simple/TiedOutFH.pm
new file mode 100755
index 00000000000..2899c0dbc82
--- /dev/null
+++ b/Master/tlpkg/tlperl.straw/lib/Pod/Simple/TiedOutFH.pm
@@ -0,0 +1,105 @@
+
+use strict;
+package Pod::Simple::TiedOutFH;
+use Symbol ('gensym');
+use Carp ();
+use vars qw($VERSION );
+$VERSION = '3.13';
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+sub handle_on { # some horrible frightening things are encapsulated in here
+ my $class = shift;
+ $class = ref($class) || $class;
+
+ Carp::croak "Usage: ${class}->handle_on(\$somescalar)" unless @_;
+
+ my $x = (defined($_[0]) and ref($_[0]))
+ ? $_[0]
+ : ( \( $_[0] ) )[0]
+ ;
+ $$x = '' unless defined $$x;
+
+ #Pod::Simple::DEBUG and print "New $class handle on $x = \"$$x\"\n";
+
+ my $new = gensym();
+ tie *$new, $class, $x;
+ return $new;
+}
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+sub TIEHANDLE { # Ties to just a scalar ref
+ my($class, $scalar_ref) = @_;
+ $$scalar_ref = '' unless defined $$scalar_ref;
+ return bless \$scalar_ref, ref($class) || $class;
+}
+
+sub PRINT {
+ my $it = shift;
+ foreach my $x (@_) { $$$it .= $x }
+
+ #Pod::Simple::DEBUG > 10 and print " appended to $$it = \"$$$it\"\n";
+
+ return 1;
+}
+
+sub FETCH {
+ return ${$_[0]};
+}
+
+sub PRINTF {
+ my $it = shift;
+ my $format = shift;
+ $$$it .= sprintf $format, @_;
+ return 1;
+}
+
+sub FILENO { ${ $_[0] } + 100 } # just to produce SOME number
+
+sub CLOSE { 1 }
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1;
+__END__
+
+Chole
+
+ * 1 large red onion
+ * 2 tomatillos
+ * 4 or 5 roma tomatoes (optionally with the pulp discarded)
+ * 1 tablespoons chopped ginger root (or more, to taste)
+ * 2 tablespoons canola oil (or vegetable oil)
+
+ * 1 tablespoon garam masala
+ * 1/2 teaspoon red chili powder, or to taste
+ * Salt, to taste (probably quite a bit)
+ * 2 (15-ounce) cans chick peas or garbanzo beans, drained and rinsed
+ * juice of one smallish lime
+ * a dash of balsamic vinegar (to taste)
+ * cooked rice, preferably long-grain white rice (whether plain,
+ basmati rice, jasmine rice, or even a mild pilaf)
+
+In a blender or food processor, puree the onions, tomatoes, tomatillos,
+and ginger root. You can even do it with a Braun hand "mixer", if you
+chop things finer to start with, and work at it.
+
+In a saucepan set over moderate heat, warm the oil until hot.
+
+Add the puree and the balsamic vinegar, and cook, stirring occasionally,
+for 20 to 40 minutes. (Cooking it longer will make it sweeter.)
+
+Add the Garam Masala, chili powder, and cook, stirring occasionally, for
+5 minutes.
+
+Add the salt and chick peas and cook, stirring, until heated through.
+
+Stir in the lime juice, and optionally one or two teaspoons of tahini.
+You can let it simmer longer, depending on how much softer you want the
+garbanzos to get.
+
+Serve over rice, like a curry.
+
+Yields 5 to 7 servings.
+
+