Changeset 7477 for lib

Show
Ignore:
Timestamp:
10/09/05 17:30:09 (3 years ago)
Author:
autrijus
Message:

* Inline::Pugs: revert to the previous, non-PIL-Run UI

as the API has changed and I don't quite feel like to
chase it right now...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lib/Inline/Pugs.pm

    r6535 r7477  
    22 
    33use strict; 
    4 use File::Basename; 
    5 use constant LIBDIRS => qw< 
    6     PIL-Run 
    7     Perl6-Value 
    8     Perl6-Container 
    9     Perl6-MetaModel 
    10 >; 
    11 use lib (map { 
    12     dirname(__FILE__) . "/../../perl5/$_/lib", 
    13 } LIBDIRS); 
     4use vars qw<$VERSION @ISA>; 
     5use constant MAGIC => 
     6    'my$Z= =$*IN;while 1{$_=perl eval eval=$*IN;print$Z;say$!//$_;print$Z;flush$*OUT}'; 
     7use constant COOKIE => rand(); 
     8use Perl6::Pugs; 
     9use IPC::Open2; 
    1410use Data::Dumper; 
    15 use vars qw< @ISA $VERSION >; 
    1611 
    1712@ISA     = 'Inline'; 
     
    8176        *{"$pkg\::$sym"} = sub { 
    8277            local $Data::Dumper::Terse = 1; 
    83             my @args = map { Dumper($_) } @_; 
     78            my @args = map { $self->quote_pugs(Dumper($_)).'.eval' } @_; 
    8479            $self->eval_pugs( 
    8580                "$sym(".join(',', @args).")" 
     
    8883    } 
    8984} 
    90  
    91 sub init_pugs { 
    92     use PIL::Run::MainX; 
    93     use PIL::Run::EvalX; 
    94     use PIL::Run::ApiX; 
    95 } 
    96  
    97 sub eval_pugs { 
    98     my $self = shift; 
    99     p6_eval($_[0]); 
    100 } 
    101  
    102 =begin comment 
    10385 
    10486sub init_pugs { 
     
    120102    return eval $out; 
    121103} 
    122  
    123 =cut 
    124104 
    125105sub quote_pugs {