--- toke.c 2002-09-04 10:16:22.000000000 -0700 +++ toke.c.org 2002-09-04 10:16:22.000000000 -0700 @@ -4,17 +4,7 @@ * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. - * - * Modified by: Graciliano M. P. (gm@virtuasites.com.br) - * Change date: 28/08/2002 - * Changes: Added dot (.) class call: foo.bar() or foo.bar - * When you call 'foo.bar()' the interpreter translate - * to 'main::foo::bar()'. Can't use &foo.bar, is the same - * as: &foo . "bar" * - * Lexer: When the lexer find 'foo.bar' in the source it translate to - * '_CORE_::foo_0__0_bar' and the package Class/DotRef.pm do - * the rest using AUTOLOAD. */ /* @@ -3875,16 +3865,12 @@ just_a_word: { SV *sv; int pkgname = 0; - int pkgdot = 0; - int pkgI , pkgJ , strSize ; - char *str_tmp ; char lastchar = (PL_bufptr == PL_oldoldbufptr ? 0 : PL_bufptr[-1]); /* Get the rest if it looks like a package qualifier */ - if (*s == '\'' || *s == '.' || (*s == ':' && s[1] == ':')) { + if (*s == '\'' || (*s == ':' && s[1] == ':')) { STRLEN morelen; - if (*s == '.') { pkgdot = 1;} s = scan_word(s, PL_tokenbuf + len, sizeof PL_tokenbuf - len, TRUE, &morelen); if (!morelen) @@ -3921,30 +3907,6 @@ gvp = 0; } else { - if ( pkgdot ) { - str_tmp = malloc(sizeof(char) * (strlen(PL_tokenbuf)*3)+6 ) ; - pkgJ = 0 ; - for (pkgI = 0; pkgI < len ; pkgI++) { - if ( PL_tokenbuf[pkgI] == ':' ) { - str_tmp[pkgJ] = '_' ; pkgJ++ ; - str_tmp[pkgJ] = '0' ; pkgJ++ ; - str_tmp[pkgJ] = '_' ; pkgJ++ ; - } - else { str_tmp[pkgJ] = PL_tokenbuf[pkgI] ; pkgJ++ ;} - } - - if ( *s != '(' ) { - str_tmp[pkgJ] = '_' ; pkgJ++ ; - str_tmp[pkgJ] = '0' ; pkgJ++ ; - str_tmp[pkgJ] = '_' ; pkgJ++ ; - str_tmp[pkgJ] = '_' ; pkgJ++ ; - str_tmp[pkgJ] = '0' ; pkgJ++ ; - str_tmp[pkgJ] = '_' ; pkgJ++ ; - } - - str_tmp[pkgJ] = '\0' ; - sprintf(PL_tokenbuf,"_CORE_::%s",str_tmp); - } len = 0; if (!gv) gv = gv_fetchpv(PL_tokenbuf, FALSE, SVt_PVCV); @@ -4008,15 +3970,7 @@ } PL_expect = XOPERATOR; - s = skipspace(s) ; - - if ( pkgdot && *s != '(') { - s[-2] = '(' ; - s[-1] = ')' ; - s-=2 ; - } - - pkgdot = 0 ; + s = skipspace(s); /* Is this a word before a => operator? */ if (*s == '=' && s[1] == '>' && !pkgname) { @@ -6133,7 +6087,7 @@ Perl_croak(aTHX_ ident_too_long); if (isALNUM(*s)) /* UTF handled below */ *d++ = *s++; - else if ( (*s == '\'' || *s == '.') && allow_package && isIDFIRST_lazy_if(s+1,UTF)) { + else if (*s == '\'' && allow_package && isIDFIRST_lazy_if(s+1,UTF)) { *d++ = ':'; *d++ = ':'; s++;