in reply to Subroutines not exporting? Why?

How do you expect a subroutine that is after the __END__ token to ever be compiled, let alone exported?

__END__ sub get_file_name { ... }

This looks like a throwback to the bad old days of AutoSplit -- which was a hinky trick at the best of times, and these days really doesn't make sense -- but if you really have a good reason to defer compilation, then you would need to be using the AutoSplit module.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Replies are listed 'Best First'.
Re^2: Subroutines not exporting? Why?
by no21 (Sexton) on Jul 06, 2015 at 14:42 UTC

    Thank you so much for your time and your help. You absolutely nailed it.

    In an attempt to test some changes I wanted to make to an existing custom module that is using AutoLoader and AutoSplit, I just copied it to a different directory and made some changes. I removed the...

    use AutoLoader; *AUTOLOAD = \&AutoLoader::AUTOLOAD;

    But I never removed the...

    __END__

    Thanks again. I really appreciate the help. Is there some way I can give you guys "credit" for helping me? I see the "++" radio buttons. Is that what I should use? I don't post to perlmonks very often, so that's why I'm asking.

      Upvoting (++) is a very appropriate way to show appreciation to all who offer useful advice.


      Give a man a fish:  <%-(-(-(-<