develooper Front page | perl.perl5.porters | Postings from November 2003

[PATCH] dynaloader patch for PAR-0.76

Thread Next
From:
Edward S. Peschko
Date:
November 25, 2003 08:50
Subject:
[PATCH] dynaloader patch for PAR-0.76
Message ID:
20031125041718.GB15868@mdssdev05.comp.pge.com
All,

below find a patch for dynaloader that stores the names of the shared objects that are
loaded into perl. Its intended for use with PAR (for run time detection of shared objects
rather than compile time analysis)

If its unacceptable, let me know either what it dups, or a preferred method of getting
this info..

Thanks,

Ed

----
apply with patch -p1 -d :perldir: < patch
----
diff -rc perl-5.8.1/ext/DynaLoader/DynaLoader_pm.PL	perl-5.8.1.new/ext/DynaLoader/DynaLoader_pm.PL	
*** perl-5.8.1/ext/DynaLoader/DynaLoader_pm.PL	Sat Sep 13 10:14:41 2003
--- perl-5.8.1.new/ext/DynaLoader/DynaLoader_pm.PL	Tue Nov 18 23:39:39 2003
***************
*** 80,85 ****
--- 80,86 ----
  my $Mac_FS;
  $Mac_FS = eval { require Mac::FileSpec::Unixish } if $Is_MacOS;
  
+ @dl_shared_objects  = ();       # shared objects for symbols we have 
  @dl_require_symbols = ();       # names of symbols we need
  @dl_resolve_using   = ();       # names of files to link with
  @dl_library_path    = ();       # path to look for files
***************
*** 328,335 ****
  
    boot:
      my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file);
- 
      # See comment block above
      &$xs(@args);
  }
  
--- 329,338 ----
  
    boot:
      my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file);
      # See comment block above
+ 
+ 	push(@dl_shared_objects, $file); # record files loaded
+ 
      &$xs(@args);
  }
  
***************
*** 548,553 ****
--- 551,557 ----
    $dl_debug
    @dl_librefs
    @dl_modules
+   @dl_shared_objects
                                                    Implemented in:
    bootstrap($modulename)                               Perl
    @filepaths = dl_findfile(@names)                     Perl
***************
*** 622,627 ****
--- 626,635 ----
  =item @dl_modules
  
  An array of module (package) names that have been bootstrap'ed.
+ 
+ =item @dl_shared_objects
+ 
+ An array of file names for the shared objects that were loaded.
  
  =item dl_error()
  

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About