in reply to Re^2: Whats the status of DBIx::Class (Re^4: Whats the status of DBIx::Class (deprecated package separator / reading P5P)
in thread Whats the status of DBIx::Class

Anyway I couldn't find out since when this feature was deprecated, seems to be enforced without grace period.

I see the deprecation warning in 5.40.0 and 5.38.0 (but not 5.36.0 or earlier):
D:\>perl -le "print $]; $don't = 1;" Old package separator "'" deprecated at -e line 1. 5.038000
And, with warnings enabled:
D:\>perl -wle "print $]; $don't = 1;" Old package separator "'" deprecated at -e line 1. Name "don::t" used only once: possible typo at -e line 1. 5.038000
Cheers,
Rob

Replies are listed 'Best First'.
Re^4: Whats the status of DBIx::Class (deprecated package separator)
by LanX (Saint) on Aug 25, 2024 at 15:01 UTC
    Thanks, I have a box with 5.38 and
    • use v5.36 was still emitting the warnings which couldn't be silenced
    • use v5.34 made it work like before
    so it seems the maintainers just need to introduce a use v5.34 or earlier (tho I couldn't test with v5.40)

    what I tried:

    $ cat t_package_sep.pl BEGIN { warn "Using Perl Version ", $], "\n";} use v5.34; no warnings 'deprecated::apostrophe_as_package_separator'; use diagnostics; use lib '.'; $don't = 1; use deprecated'apostrophe; $ cat deprecated/apostrophe.pm warn "Module ". __FILE__ ." loaded"; 1; $ perl t_package_sep.pl Using Perl Version 5.038002 Module deprecated/apostrophe.pm loaded at deprecated/apostrophe.pm lin +e 1.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

    UPDATE
    hmm, strangely this is still producing the silenced warnings. Not sure if it's a bug or a documented feature regarding the deprecated:: category.

    use v5.34; use warnings; no warnings 'deprecated::apostrophe_as_package_separator';
    _