in reply to Re: Source filters: filter some module before including in my package
in thread Source filters: filter some module before including in my package

Can you tell me why nothing works?
push @INC, \&my_sub; sub my_sub { my ($self, $filename) = @_; warn $filename; } require IO::Socket;
Expected at least output smth like: "/usr/lib/perl5/IO/Socket.pm", but get nothing. Whats wrong?
  • Comment on Re^2: Source filters: filter some module before including in my package
  • Download Code

Replies are listed 'Best First'.
Re^3: Source filters: filter some module before including in my package
by OlegG (Monk) on Sep 15, 2011 at 16:40 UTC
    Ok, I understand. I should unshift for my purposes instead of push.