Help for this page

Select Code to Download


  1. or download this
    package Dsay;
    use warnings;
    ...
    
    sub get_darea() { $d_area }
    # Etc.
    
  2. or download this
    sub common_sub {
        say 'call to common sub (d_area is ', get_darea(), ')';
    ...
        common_sub;
        dsay "more debugging output from two";
    }
    
  3. or download this
    Can't create a Scope::Guard in void context
    
  4. or download this
    use Dsay;
    
    package Dsay;
    our $d_area;
    package main;
    
  5. or download this
    *d_area = *Dsay::d_area;
    
  6. or download this
    use Exporter;
    our @EXPORT = qw( %debug dsay $d_area );
    ...
        *{ $caller . '::d_area' } = *Dsay::d_area;
        goto &Exporter::import
    }
    
  7. or download this
    use Exporter qw{ import };
    our @EXPORT = qw( %debug %opt dsay );
    ...
            : "DEBUG: ";
        say $prefix, @args;
    }
    
  8. or download this
    sub one {
        say "call to one:";
    ...
        dsay "more debugging output from one";
    }
    # Etc.
    
  9. or download this
            *{"${callpkg}::$sym"} =
                $type eq '&' ? \&{"${pkg}::$sym"} :
    ...
                $type eq '%' ? \%{"${pkg}::$sym"} :
                $type eq '*' ?  *{"${pkg}::$sym"} :
                do { require Carp; Carp::croak("Can't export symbol: $type
    +$sym") };
    
  10. or download this
        *{ $caller . '::d_area' } = 'Dsay::d_area';
    
  11. or download this
    *{"${callpkg}::$sym"} = "${pkg}::$sym" if '$' eq $type;