Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fields.pm manpage: syntax error in example code #159

Closed
p5pRT opened this issue Jul 4, 1999 · 1 comment
Closed

fields.pm manpage: syntax error in example code #159

p5pRT opened this issue Jul 4, 1999 · 1 comment

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Jul 4, 1999

Migrated from rt.perl.org#964 (status was 'resolved')

Searchable as RT964$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 4, 1999

From splice@zerg.com

Fields manpage​: http​://www.rge.com/CPAN/doc/manual/html/lib/fields.html
The fields manpage has incorrect code at the bottom of the DESCRIPTION
section. Here is the code​:

sub new
  {
  my $class = shift;
  no strict 'refs';
  my $self = bless [\%{"$class\​::FIELDS"], $class; # INCORRECT LINE
  $self;
  }

It's got an opening "{", but it's got no closing "}". I have tested this
example under perl 5.005 and, as expected, it only works if you put in the
closing "}". This is what the code should say​:

sub new
  {
  my $class = shift;
  no strict 'refs';
  my $self = bless [\%{"$class\​::FIELDS"}], $class; # CORRECT LINE
  $self;
  }

- David James
beta@​home.com

Perl Info


Site configuration information for perl 5.005:

Summary of my perl5 (5.0 patchlevel 5 subversion 00) configuration:
  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-object
    uname=''
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cl.exe', optimize='-O2 -MD -DNDEBUG -TP -GX', gccversion=
    cppflags='-DWIN32'
    ccflags
'-O2 -MD -DNDEBUG -TP -GX -DWIN32 -D_CONSOLE -DNO_STRICT  -DHAVE_DES_FCRYPT 
-DPERL_OBJECT'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -release -machine:x86'
    libpth="d:\program files\devstudio\vc\lib"
    libs= oldnames.lib kernel32.lib user32.lib gdi32.lib  winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib  oleaut32.lib netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
PerlCRT.lib
    libc=f:\Perl32\5.005\bin\MSWin32-x86-object\PerlCRT.lib, so=dll,
useshrplib=yes, libperl=perlcore.lib
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ',
lddlflags='-dll -nologo -nodefaultlib -release -machine:x86'

Locally applied patches:



@INC for perl 5.005:
    F:\PERL32\5.005\lib/MSWin32-x86-object
    F:\PERL32\5.005\lib
    F:\PERL32\site\5.005\lib/MSWin32-x86-object
    F:\PERL32\site\5.005\lib
    F:\PERL32\site\lib
    .


Environment for perl 5.005:
    HOME (unset)
    LANG (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)

PATH=f:\Perl32\5.005\bin\MSWin32-x86-object;f:\Perl32\5.005\bin;F:\PERL\BIN;
F:\PERL\BIN;C:\PROGRA~1\ULTRAEDT;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\WINDOWS\SY
STEM;F:\PERL\BIN
    PERL_BADLANG (unset)
    SHELL (unset)



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.