On Mar 4, 2015, at 8:15 PM, Brandon McCaig wrote:
>
> That could matter in rare, silly cases. In most cases, it
> wouldn't really matter (usually we "require" modules and assert
> versions at the beginning of a program or module before anything
> else is actually done).
That explains it.
On 5 March 2015 at 17:15, Brandon McCaig wrote:
> Uri means that use is
> effectively requiring the module with a BEGIN block. That means
> that it will execute before any other code that isn't in a BEGIN
> block.
>
It may also be worth mentioning that "BEGIN" is actually a sub. A special
sub t
On 03/04/2015 11:15 PM, Brandon McCaig wrote:
I think that generally you should be using `use' unless you have a
specific need to use require directly. `use' will call require() under
the surface when needed so to you it's basically the same, but it has
added benefits that make sense generally.
On Wed, Mar 04, 2015 at 06:26:41PM -0800, SSC_perl wrote:
> So there's only really a difference for loading modules, not
> for setting the minimum version number?
There could be a difference if code with side effects is done
first. By being done at compile-time, Uri means that use is
effectively r
On Mar 4, 2015, at 6:14 PM, Uri Guttman wrote:
>
> it is more about when the check is done. use is done at compile time and
> require is done at run time. also use effectively calls require to load the
> module and then it may do importing as well. when a module is loaded it will
> run any use
On 03/04/2015 09:12 PM, SSC_perl wrote:
Hi all,
I'm just curious about something. What's the difference between using
require 5.016;
or
use 5.016;
The only thing I've seen is that if 5.16 isn't installed, 'use' outputs:
Perl v5.16 required--this is only v5.10.1, stopped at
Hi all,
I'm just curious about something. What's the difference between using
require 5.016;
or
use 5.016;
The only thing I've seen is that if 5.16 isn't installed, 'use' outputs:
Perl v5.16 required--this is only v5.10.1, stopped at shop.cgi line 26.
BEGIN failed--compilatio