yoni / git_history_visualizer

Summarizes and visualizes lines of code for different file types over the history of a git repository.
2 stars 0 forks source link

cloc syntax errors, global symbols require explicit package names #2

Open AndydeCleyre opened 10 years ago

AndydeCleyre commented 10 years ago

Hi,

I'm using r 3.1.0 and perl 5.18.2. When I run run.sh <repo> <outdir>, the stdout is full of:

defined(@array) is deprecated at ../lib/cloc-1.55.pl line 980.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ../lib/cloc-1.55.pl line 982.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ../lib/cloc-1.55.pl line 1303.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ../lib/cloc-1.55.pl line 1434.
        (Maybe you should just omit the defined()?)
syntax error at ../lib/cloc-1.55.pl line 1841, near "$symbol qw( == != + - )"
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1845.
Global symbol "$version" requires explicit package name at ../lib/cloc-1.55.pl line 1845.
Global symbol "$elapsed_sec" requires explicit package name at ../lib/cloc-1.55.pl line 1845.
Global symbol "@results" requires explicit package name at ../lib/cloc-1.55.pl line 1846.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1846.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1849.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1850.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1852.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1853.
Global symbol "$BY_FILE" requires explicit package name at ../lib/cloc-1.55.pl line 1855.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1857.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1858.
Global symbol "$rhhh_count" requires explicit package name at ../lib/cloc-1.55.pl line 1858.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1860.
Global symbol "@results" requires explicit package name at ../lib/cloc-1.55.pl line 1864.
Global symbol "$line" requires explicit package name at ../lib/cloc-1.55.pl line 1864.
Global symbol "@results" requires explicit package name at ../lib/cloc-1.55.pl line 1868.
syntax error at ../lib/cloc-1.55.pl line 1869, near "}"
../lib/cloc-1.55.pl has too many errors.
AndydeCleyre commented 10 years ago

http://perlmaven.com/global-symbol-requires-explicit-package-name

It looks like these variables need to be declared with "my" in each first occurrence.

yoni commented 10 years ago

This makes me think I shouldn't package cloc with the repo, and instead require the user to install it. I'm not a perl man...do y'all have a suggestion for how to manage this dependency?