1 2use strict; 3package Pod::Simple::TiedOutFH; 4use Symbol ('gensym'); 5use Carp (); 6use vars qw($VERSION ); 7$VERSION = '3.35'; 8 9#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 10 11sub handle_on { # some horrible frightening things are encapsulated in here 12 my $class = shift; 13 $class = ref($class) || $class; 14 15 Carp::croak "Usage: ${class}->handle_on(\$somescalar)" unless @_; 16 17 my $x = (defined($_[0]) and ref($_[0])) 18 ? $_[0] 19 : ( \( $_[0] ) )[0] 20 ; 21 $$x = '' unless defined $$x; 22 23 #Pod::Simple::DEBUG and print STDERR "New $class handle on $x = \"$$x\"\n"; 24 25 my $new = gensym(); 26 tie *$new, $class, $x; 27 return $new; 28} 29 30#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 31 32sub TIEHANDLE { # Ties to just a scalar ref 33 my($class, $scalar_ref) = @_; 34 $$scalar_ref = '' unless defined $$scalar_ref; 35 return bless \$scalar_ref, ref($class) || $class; 36} 37 38sub PRINT { 39 my $it = shift; 40 foreach my $x (@_) { $$$it .= $x } 41 42 #Pod::Simple::DEBUG > 10 and print STDERR " appended to $$it = \"$$$it\"\n"; 43 44 return 1; 45} 46 47sub FETCH { 48 return ${$_[0]}; 49} 50 51sub PRINTF { 52 my $it = shift; 53 my $format = shift; 54 $$$it .= sprintf $format, @_; 55 return 1; 56} 57 58sub FILENO { ${ $_[0] } + 100 } # just to produce SOME number 59 60sub CLOSE { 1 } 61 62#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 631; 64__END__ 65 66Chole 67 68 * 1 large red onion 69 * 2 tomatillos 70 * 4 or 5 roma tomatoes (optionally with the pulp discarded) 71 * 1 tablespoons chopped ginger root (or more, to taste) 72 * 2 tablespoons canola oil (or vegetable oil) 73 74 * 1 tablespoon garam masala 75 * 1/2 teaspoon red chili powder, or to taste 76 * Salt, to taste (probably quite a bit) 77 * 2 (15-ounce) cans chick peas or garbanzo beans, drained and rinsed 78 * juice of one smallish lime 79 * a dash of balsamic vinegar (to taste) 80 * cooked rice, preferably long-grain white rice (whether plain, 81 basmati rice, jasmine rice, or even a mild pilaf) 82 83In a blender or food processor, puree the onions, tomatoes, tomatillos, 84and ginger root. You can even do it with a Braun hand "mixer", if you 85chop things finer to start with, and work at it. 86 87In a saucepan set over moderate heat, warm the oil until hot. 88 89Add the puree and the balsamic vinegar, and cook, stirring occasionally, 90for 20 to 40 minutes. (Cooking it longer will make it sweeter.) 91 92Add the Garam Masala, chili powder, and cook, stirring occasionally, for 935 minutes. 94 95Add the salt and chick peas and cook, stirring, until heated through. 96 97Stir in the lime juice, and optionally one or two teaspoons of tahini. 98You can let it simmer longer, depending on how much softer you want the 99garbanzos to get. 100 101Serve over rice, like a curry. 102 103Yields 5 to 7 servings. 104 105 106