in reply to Re^12: let Makefile.PL to do the Readme file for me -- new target? (Powershell)
in thread let Makefile.PL to do the Readme file for me -- new target?

In PS you'll transport a list of objects , e.g. the file-size is just an attribute of one of the file-objects 

that's interesting, I was not aware. Actually it sounds impressive but in reality is nothing more than a unix-like pipe communication passing a text-json-pojo-whatever or, as easily, binary-data to, e.g., represent serialized objects. Both can be and are achieved in unix. Text-pipes we are all aware of and for binary: an example is imagemagick's piping of binary images to its various converter-executables.

This however poses some more interesting questions: for example are these objects allowed to have pointers to other objects? Surely there is inter-linkage. For example a file object with pointers to the object of its user-owner which in turn will have pointers to history-object and preferences-object and a myriad of other details? Often saucy and often remotely stored? Oh that's lovely, I can suck the whole M$-big-brother-brain with just an ls. and God said let there be ls. I can imagine that with just an ls I can suck each and every digital record ever existed.

Further, when do these objects expire/die/cleared from memory? It seems that there is a gargantuan garbage collector larking at the bowels of the OS? And is very busy indeed. With each innocent find c:/*.*|grep which could potentially copy the whole hard-disk's contents into RAM and then back to disk-swap to feed back find. Here's a nice blue screen of death right there.

Anyway, some thoughts. now, begin-trolling:

Nah... M$ is thoughtless crap (disclaimer: If trump was voted in as USA president then I am allowed an aphorism for each of them votes).

end-trolling

bw, bliako

Replies are listed 'Best First'.
Re^14: let Makefile.PL to do the Readme file for me -- new target? (Powershell)
by LanX (Cardinal) on Jan 22, 2021 at 00:45 UTC
    > for example are these objects allowed to have pointers to other objects?

    yes, a little demo

    PS C:\tmp> ls tst # stringific +ation of list of objects Verzeichnis: C:\tmp Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 22.01.2021 01:23 12 tst PS C:\tmp> (ls tst).GetAccessControl().Owner # get Access + Obj and get owner COM\RolfLanX PS C:\tmp> $x=ls tst # save obj i +n var PS C:\tmp> $x.length 6 PS C:\tmp> cat tst PS C:\tmp> echo "blabla" >tst # change con +tent PS C:\tmp> $x.length # old length 6 PS C:\tmp> (ls tst).length # new length 18

    I also already found a caveat

    PS C:\tmp> (ls tst*).name # name for each list element tst tst.pl tst.txt tst_flushing.pl tst_flushing.pl~ tst_onclick.html tst_onclick.html~ tst_pde.pl tst_pde.pm tst_pde.pm~ PS C:\tmp> (ls tst*).length # length of list not list elements 10

    NB: The "cmdlet" Get-ChiltItem (aka ls) can list very different types of objects, not only filesystem.

    PS C:\tmp> ls -Path HKLM:\HARDWARE Hive: HKEY_LOCAL_MACHINE\HARDWARE Name Property ---- -------- ACPI DESCRIPTION DEVICEMAP RESOURCEMAP UEFI PS C:\tmp> cd -Path HKLM:\HARDWARE # cd into registry PS HKLM:\HARDWARE> ls -name # list names ACPI DESCRIPTION DEVICEMAP RESOURCEMAP UEFI PS HKLM:\HARDWARE>

    TIMTOWTDI, this is was all done without even piping.

    You might wanna consult a tutorial, I only scratched the surface so far. :)

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

      ok thanks, it's all new to me. And I found a couple of related modules on CPAN. The dir-style for options also appears in Linux (e.g. /proc) don't know which was there first.

        Disclaimer: I'm still far more fluent in bash and linux tools.

        But I'd like to see some of these features used in Perl.

        > ps | where Company -like *LLC | select name,company -last 4 Name Company ---- ------- chrome Google LLC chrome Google LLC PTIM Cisco WebEx LLC ptpluginhost Cisco WebEx LLC

        update

        changed example

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